GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — pythonbirds/fases/brasil.py at simples · RICKY1555/pythonbirds

Expand file tree

/

brasil.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
44 lines (35 loc) · 1.28 KB
/

brasil.py

Copy path

File metadata and controls

44 lines (35 loc) · 1.28 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# -*- coding: utf-8 -*-
from os import path
import sys
project_dir = path.dirname(__file__)
project_dir = path.join('..')
sys.path.append(project_dir)
from atores import PassaroAmarelo, PassaroVermelho, Obstaculo, Porco
from fase import Fase
from placa_grafica_tkinter import rodar_fase
if __name__ == '__main__':
fase = Fase(intervalo_de_colisao=10)
deltax_gambi=80
# Adicionar Pássaros Amarelos
for i in range(100):
fase.adicionar_passaro(PassaroAmarelo(30, 30))
# linhas verticais
for i in range(30, 300, 32):
fase.adicionar_porco(Porco(700-deltax_gambi, i))
fase.adicionar_porco(Porco(200-deltax_gambi, i))
# linhas horizontais
for i in range(240, 680, 32):
fase.adicionar_porco(Porco(i-deltax_gambi, 30))
fase.adicionar_porco(Porco(i-deltax_gambi, 286))
x0 = 210-deltax_gambi
# losango
meio = 160
n = 9
delta_x = 28
delta_y = 12
for i in range(1, n):
fase.adicionar_porco(Porco(x0 + delta_x * i, meio + delta_y * i))
fase.adicionar_porco(Porco(x0 + delta_x * i, meio - delta_y * i))
fase.adicionar_porco(Porco(x0 + (n + i - 1) * delta_x, meio + (n - i) * delta_y))
fase.adicionar_porco(Porco(x0 + (n + i - 1) * delta_x, meio + (i - n) * delta_y))
rodar_fase(fase)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.