Skip to content

Commit 08ed08d

Browse files
author
renzon
committed
Teste colisão com ator destruido ok
1 parent 3b6a64f commit 08ed08d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

atores.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def calcular_posicao(self, tempo):
2323
return x, y, caracter
2424

2525
def colidir(self, outro_ator):
26+
if self.status == DESTRUIDO or outro_ator.status == DESTRUIDO:
27+
return False
2628
x1, y1 = self.ponto_cartesiano_inteiro()
2729
x2, y2 = outro_ator.ponto_cartesiano_inteiro()
2830

@@ -34,5 +36,6 @@ def esta_no_intervalo(coordenada1, coordenada2, intervalo=1):
3436
self.status = DESTRUIDO
3537
outro_ator.status = DESTRUIDO
3638
return True
39+
return False
3740

3841

0 commit comments

Comments
 (0)