Skip to content

Commit 97dff1b

Browse files
author
renzon
committed
Teste pegando bug com passaros sobrando e porcos todos inativos: Bug consertado
1 parent 83f65bc commit 97dff1b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

fase.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ def acabou(self, tempo):
4040
return not self._existe_porco_ativo(tempo) or not self._existe_passaro_ativo(tempo)
4141

4242
def status(self, tempo):
43+
if not self._existe_porco_ativo(tempo):
44+
return 'Jogo em encerrado. Você ganhou!'
4345
if self._existe_passaro_ativo(tempo):
4446
return 'Jogo em andamento.'
45-
if self._existe_porco_ativo(tempo):
46-
return 'Jogo em encerrado. Você perdeu!'
47-
return 'Jogo em encerrado. Você ganhou!'
47+
return 'Jogo em encerrado. Você perdeu!'
4848

4949
def lancar(self, angulo, tempo):
5050
for passaro in self._passaros:

0 commit comments

Comments
 (0)