diff --git a/GameState.py b/GameState.py index 6442352..9c54c95 100644 --- a/GameState.py +++ b/GameState.py @@ -6,6 +6,9 @@ from itertools import cycle from lamps.LampGroup import * import asyncio import threading +from Sound import Sound +from sounds.YoureChamp import YoureChamp +from sounds.YoureGood import YoureGood class GameState: playerCount = 0 @@ -35,6 +38,10 @@ class GameState: self.checkHighscore() self.currentPlayer = next(self.players) + Lamp("Highest Score").deactivate() + if self.currentPlayer.hasHighScore: + Lamp("Highest Score").activate() + def checkHighscore(self): highestScorePlayer = None @@ -61,6 +68,10 @@ class GameState: logging.info("Game Started") def endGame(self): + for player in self.playerList: + if player.hasHighscore: + YoureChamp().play() + self.checkHighscore() self.writeHighscore() self.players = None @@ -103,7 +114,10 @@ class GameState: def idleLoop(self): all_cabinet_lamps = [BONUS_LAMPS, BONUS_MULTIPLIER_LAMPS, CHAMP_LAMPS, UPPER_PLAYFIELD_TIME_LAMPS, TUNNEL_NUMBER_LAMPS, - TUNNEL_LAMPS, TUNNEL_SCORE_LAMPS] + TUNNEL_LAMPS, TUNNEL_SCORE_LAMPS, ORANGE_SPECIAL_LAMPS] + + YoureGood().play() + while True: for _ in range(20): random_group = random.choice(all_cabinet_lamps) diff --git a/targets/slingshots/LeftSlingshotTarget.py b/targets/slingshots/LeftSlingshotTarget.py index 8e1487f..4153a65 100644 --- a/targets/slingshots/LeftSlingshotTarget.py +++ b/targets/slingshots/LeftSlingshotTarget.py @@ -1,8 +1,9 @@ from Target import Target - +from Sound import Sound class LeftSlingshotTarget(Target): def __init__(self): super().__init__(100, 'Left Slingshot') def hit(self): + Sound(6).play() super().hit() \ No newline at end of file diff --git a/targets/slingshots/RightSlingshotTarget.py b/targets/slingshots/RightSlingshotTarget.py index 2161f8b..8201adc 100644 --- a/targets/slingshots/RightSlingshotTarget.py +++ b/targets/slingshots/RightSlingshotTarget.py @@ -1,4 +1,5 @@ from Target import Target +from Sound import Sound class RightSlingshotTarget(Target): @@ -6,4 +7,5 @@ class RightSlingshotTarget(Target): super().__init__(10, "Right Slingshot") def hit(self): + Sound(6).play() super().hit() \ No newline at end of file