Deactivate bonus slow

This commit is contained in:
Jonas Zeunert
2022-06-07 01:37:06 +02:00
parent c58426b96c
commit 3fa64a2c8a
2 changed files with 12 additions and 2 deletions

View File

@@ -29,3 +29,4 @@ WAIT_TIME_TO_RESET_SECONDS = 0.15
MAX_NETWORK_RETRIES = 10
NETWORK_SLEEP_TIME_SECONDS = 0.1
BANK_SLEEP_TIME = 0.1
BONUS_SLEEP_TIME = 0.1

View File

@@ -6,6 +6,11 @@ from events.StartBallEvent import StartBallEvent
from solenoids.MainFlipper import MainFlipper
from solenoids.TopFlipper import TopFlipper
from time import sleep
from config import BONUS_SLEEP_TIME
from lamps.LampGroup import BONUS_LAMPS
class EndBallEvent(Event):
def __init__(self, gameState):
self.gameState = gameState
@@ -30,5 +35,9 @@ class EndBallEvent(Event):
EndGameEvent().trigger(None)
def scorePoints(self):
bonus = self.gameState.currentPlayer.bonus * self.gameState.currentPlayer.bonusMultiplier * 1000
currentPlayer = self.gameState.currentPlayer
for i in range(currentPlayer.bonus):
bonus = self.gameState.currentPlayer.bonusMultiplier * 1000
self.gameState.currentPlayer.addPoints(bonus)
BONUS_LAMPS.deactivateCurrent()
sleep(BONUS_SLEEP_TIME)