Aggiungi la funzione count_rats per contare i ratti e aggiorna la logica di gioco; modifica la risoluzione nel file .env e gestisci eccezioni nel metodo pop di Timer
This commit is contained in:
+4
-1
@@ -59,7 +59,10 @@ class Timer(Bomb):
|
||||
if not unit:
|
||||
unit = self
|
||||
self.game.play_sound("BOMB.WAV")
|
||||
self.game.units.pop(unit.id)
|
||||
try:
|
||||
self.game.units.pop(unit.id)
|
||||
except:
|
||||
print(f"Unit {unit.id} already dead")
|
||||
self.game.spawn_unit(Explosion, unit.position)
|
||||
for direction in ["N", "S", "E", "W"]:
|
||||
x, y = unit.position
|
||||
|
||||
Reference in New Issue
Block a user