Game over if there's only monsters

This commit is contained in:
theo@manjaro 2021-10-18 13:28:13 +02:00
parent 506930b67e
commit d9f632072a

View File

@ -65,16 +65,19 @@ class Manager(BaseObject):
self.can_sfx = True
lemmings ="Lemming")
nblemmings = len(lemmings) + len("Spawner"))
# Updating score
# Updating score and checking if there's only monsters
nbmonsters = 0
if not["pause"]:
for lemming in lemmings:
if == "monster":
if not lemming.selected:
# Pausing the game
if["keys"]["escape"]["timer"]==1:["pause"] = not["pause"]
# Spawning more lemmings
if (self.lives>0 and nblemmings>0):
if (self.lives>0 and nblemmings>0 and (nbmonsters!=nblemmings)):
if not["pause"]:
if self.spawntimer.tick(,self.tiles,speedmargin=int(self.speedmargin+0.5),skins=self.skins))