shoot again lamp

This commit is contained in:
Jonas Zeunert
2022-06-07 01:05:35 +02:00
parent e422a62445
commit 17027e9411
2 changed files with 10 additions and 4 deletions

View File

@@ -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