This commit is contained in:
Jonas Zeunert
2022-08-31 15:07:44 +02:00
parent ca75dba340
commit 0ef881bb91
2 changed files with 5 additions and 3 deletions

View File

@@ -82,8 +82,7 @@ class PlayerState:
self.enableTiming() self.enableTiming()
self.specialDisplay.printBallsToPlay(self.ballsLeft) self.printSpecial()
self.specialDisplay.printGameTimeBonus(self.bonusTime)
def activate(self): def activate(self):
self.resetBall() self.resetBall()
@@ -303,6 +302,7 @@ class PlayerState:
return return
self.replayBallTimer = Timer(interval=1, function=self.updateReplayBall) self.replayBallTimer = Timer(interval=1, function=self.updateReplayBall)
def stopReplayBall(self): def stopReplayBall(self):
if not self.isActive: if not self.isActive:
return return

View File

@@ -6,6 +6,8 @@ from events.StartBallEvent import StartBallEvent
from solenoids.MainFlipper import MainFlipper from solenoids.MainFlipper import MainFlipper
from solenoids.TopFlipper import TopFlipper from solenoids.TopFlipper import TopFlipper
from solenoids.OutHoleSolenoid import OutHoleSolenoid
from time import sleep from time import sleep
from config import BONUS_SLEEP_TIME from config import BONUS_SLEEP_TIME
@@ -22,7 +24,7 @@ class EndBallEvent(Event):
MainFlipper().deactivate() MainFlipper().deactivate()
if self.gameState.currentPlayer.replayBall or not self.gameState.currentPlayer.hasBallScored: if self.gameState.currentPlayer.replayBall or not self.gameState.currentPlayer.hasBallScored:
StartBallEvent().trigger(None) OutHoleSolenoid().trigger()
return return
self.gameState.isPlaying = False self.gameState.isPlaying = False