Add replay ball

This commit is contained in:
Jonas Zeunert
2022-08-31 14:50:11 +02:00
parent 401b3a332b
commit 4da7a3110d
7 changed files with 64 additions and 28 deletions

View File

@@ -1,7 +1,6 @@
import config
from Event import Event
from events.EndGameEvent import EndGameEvent
from events.StartBallEvent import StartBallEvent
from solenoids.MainFlipper import MainFlipper
@@ -33,7 +32,7 @@ class EndBallEvent(Event):
self.gameState.currentPlayer.deactivate()
if self.gameState.currentPlayer.ballsLeft == 0 and self.gameState.currentPlayer.id == config.MAX_PLAYERS - 1:
EndGameEvent().trigger(None)
self.gameState.endGame()
return
self.gameState.nextPlayer()