diff --git a/PlayerState.py b/PlayerState.py index ffff166..cf85a97 100644 --- a/PlayerState.py +++ b/PlayerState.py @@ -6,6 +6,7 @@ import logging import config from lamps.Lamp import Lamp +from lamps.Lamp import SHOOT_AGAIN from lamps.LampGroup import CHAMP_LAMPS from lamps.LampGroup import UPPER_PLAYFIELD_TIME_LAMPS from lamps.LampGroup import TUNNEL_NUMBER_LAMPS @@ -139,17 +140,20 @@ class PlayerState: def reset(self): self.resetBall() - self.upperPlayfieldTime = next(self.upperPlayfieldTimeIter) - self.replayBall = False - self.hasBallScored = False + self.points = 0 def resetBall(self): self.resetBanks() self.resetTargets() self.printSpecial() + self.upperPlayfieldTime = next(self.upperPlayfieldTimeIter) self.upperPlayfieldTimer = None self.upperPlayfieldTimeIter = iter(UPPER_PLAYFIELD_TIME) + self.replayBall = False + self.hasBallScored = False + SHOOT_AGAIN.activate() + self.resetBonus() def resetBonus(self): @@ -280,6 +284,7 @@ class PlayerState: return if not self.hasBallScored: + SHOOT_AGAIN.deactivate() self.hasBallScored = True self.points += points diff --git a/lamps/Lamp.py b/lamps/Lamp.py index b8dfc0a..3add06f 100644 --- a/lamps/Lamp.py +++ b/lamps/Lamp.py @@ -13,4 +13,5 @@ class Lamp: def isActivated(self): networking.getLamps(self) -CREDIT = Lamp('Credit') \ No newline at end of file +CREDIT = Lamp('Credit') +SHOOT_AGAIN = Lamp('Ball') \ No newline at end of file