Aggiungi supporto per la risoluzione personalizzata e gestione della pausa nel gioco
This commit is contained in:
+8
-3
@@ -53,7 +53,8 @@ class Timer(Bomb):
|
||||
if self.age == AGE_THRESHOLD:
|
||||
self.die()
|
||||
|
||||
def die(self, unit=None):
|
||||
def die(self, unit=None, score=None):
|
||||
score = 10
|
||||
print("BOOM")
|
||||
if not unit:
|
||||
unit = self
|
||||
@@ -68,11 +69,15 @@ class Timer(Bomb):
|
||||
for victim in self.game.unit_positions.get((x, y), []):
|
||||
if victim.id in self.game.units:
|
||||
if victim.partial_move >= 0.5:
|
||||
victim.die()
|
||||
victim.die(score=score)
|
||||
if score < 160:
|
||||
score *= 2
|
||||
for victim in self.game.unit_positions_before.get((x, y), []):
|
||||
if victim.id in self.game.units:
|
||||
if victim.partial_move < 0.5:
|
||||
victim.die()
|
||||
victim.die(score=score)
|
||||
if score < 160:
|
||||
score *= 2
|
||||
else:
|
||||
break
|
||||
if direction == "N":
|
||||
|
||||
Reference in New Issue
Block a user