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 — Refactor para pássaros sumirem · pythonprobr/pythonbirds@a70028f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • atores.py
  • testes
    • atores_testes.py
    • fase_testes.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎atores.py‎

Copy file name to clipboardExpand all lines: atores.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class Ator():
1111
_caracter_ativo = 'A'
12-
_caracter_destruido = '+'
12+
_caracter_destruido = ' '
1313

1414
def caracter(self, tempo):
1515
if self.status(tempo) == ATIVO:
@@ -51,11 +51,11 @@ def esta_no_intervalo(coordenada1, coordenada2, intervalo=1):
5151

5252
class Obstaculo(Ator):
5353
_caracter_ativo = 'O'
54-
_caracter_destruido = ' '
5554

5655

5756
class Porco(Ator):
5857
_caracter_ativo = '@'
58+
_caracter_destruido = '+'
5959

6060

6161
GRAVIDADE = 10 # m/s^2
Collapse file

‎testes/atores_testes.py‎

Copy file name to clipboardExpand all lines: testes/atores_testes.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def teste_colisao_somente_um_ator_destruido(self):
8888

8989
def teste_status(self):
9090
ator = Ator()
91-
assert_ator_status(self, ator, 'A', '+')
91+
assert_ator_status(self, ator, 'A', ' ')
9292

9393

9494
class ObstaculoTestes(TestCase):
@@ -129,7 +129,7 @@ def teste_posicao_antes_do_lancamento(self):
129129

130130
def teste_status(self):
131131
passaro_amarelo = PassaroVermelho(1, 1)
132-
assert_ator_status(self, passaro_amarelo, 'D', '+')
132+
assert_ator_status(self, passaro_amarelo, 'D', ' ')
133133

134134
def teste_colisao_com_chao(self):
135135
for i in range(30):
@@ -163,7 +163,7 @@ def teste_posicao_antes_do_lancamento(self):
163163

164164
def teste_status(self):
165165
passaro_amarelo = PassaroAmarelo(1, 1)
166-
assert_ator_status(self, passaro_amarelo, '>', '+')
166+
assert_ator_status(self, passaro_amarelo, '>', ' ')
167167

168168
def teste_colisao_com_chao(self):
169169
for i in range(30):
Collapse file

‎testes/fase_testes.py‎

Copy file name to clipboardExpand all lines: testes/fase_testes.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ def teste_calcular_pontos(self):
131131
Ponto(70, 1, '@')]
132132
self.assertListEqual(expected, fase_exemplo.calcular_pontos(0))
133133

134-
expected = [Ponto(31, 11, '+'), Ponto(17, 25, '>'), Ponto(3, 3, '>'), Ponto(31, 10, ' '), Ponto(78, 1, '@'),
134+
expected = [Ponto(31, 11, ' '), Ponto(17, 25, '>'), Ponto(3, 3, '>'), Ponto(31, 10, ' '), Ponto(78, 1, '@'),
135135
Ponto(70, 1, '@')]
136136
self.assertListEqual(expected, fase_exemplo.calcular_pontos(4))
137137

138-
expected = [Ponto(31, 11, '+'), Ponto(57, 30, '>'), Ponto(69, 2, '+'), Ponto(31, 10, ' '), Ponto(78, 1, '@'),
138+
expected = [Ponto(31, 11, ' '), Ponto(57, 30, '>'), Ponto(69, 2, ' '), Ponto(31, 10, ' '), Ponto(78, 1, '@'),
139139
Ponto(70, 1, '+')]
140140
self.assertListEqual(expected, fase_exemplo.calcular_pontos(7))
141141

142-
expected = [Ponto(31, 11, '+'), Ponto(77, 2, '+'), Ponto(69, 2, '+'), Ponto(31, 10, ' '), Ponto(78, 1, '+'),
142+
expected = [Ponto(31, 11, ' '), Ponto(77, 2, ' '), Ponto(69, 2, ' '), Ponto(31, 10, ' '), Ponto(78, 1, '+'),
143143
Ponto(70, 1, '+')]
144144
self.assertListEqual(expected, fase_exemplo.calcular_pontos(8.5))
145145

0 commit comments

Comments
0 (0)
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.