haha
This commit is contained in:
@@ -28,6 +28,9 @@ class GameState:
|
|||||||
self.startIdleLoop()
|
self.startIdleLoop()
|
||||||
|
|
||||||
def nextPlayer(self):
|
def nextPlayer(self):
|
||||||
|
if not self.isStarted:
|
||||||
|
return
|
||||||
|
|
||||||
self.currentPlayer = next(self.players)
|
self.currentPlayer = next(self.players)
|
||||||
|
|
||||||
def startGame(self, playerCount):
|
def startGame(self, playerCount):
|
||||||
@@ -41,6 +44,7 @@ class GameState:
|
|||||||
def endGame(self):
|
def endGame(self):
|
||||||
self.writeHighscore()
|
self.writeHighscore()
|
||||||
self.players = None
|
self.players = None
|
||||||
|
self._currentPlayer = self.dummyPlayer
|
||||||
self.isPlaying = False
|
self.isPlaying = False
|
||||||
self.isStarted = False
|
self.isStarted = False
|
||||||
logging.info("Game ended")
|
logging.info("Game ended")
|
||||||
@@ -50,7 +54,6 @@ class GameState:
|
|||||||
self.isIdle = True
|
self.isIdle = True
|
||||||
self.idleThread = threading.Thread(target=self.idleLoop)
|
self.idleThread = threading.Thread(target=self.idleLoop)
|
||||||
self.idleThread.start()
|
self.idleThread.start()
|
||||||
pass
|
|
||||||
|
|
||||||
def stopIdleLoop(self):
|
def stopIdleLoop(self):
|
||||||
logging.info("Stopping Idle Loop")
|
logging.info("Stopping Idle Loop")
|
||||||
@@ -58,8 +61,6 @@ class GameState:
|
|||||||
self.idleThread.join()
|
self.idleThread.join()
|
||||||
self.deactivate_all()
|
self.deactivate_all()
|
||||||
|
|
||||||
pass
|
|
||||||
|
|
||||||
def deactivate_all(self):
|
def deactivate_all(self):
|
||||||
all_cabinet_lamps = [BONUS_LAMPS, BONUS_MULTIPLIER_LAMPS, CHAMP_LAMPS,
|
all_cabinet_lamps = [BONUS_LAMPS, BONUS_MULTIPLIER_LAMPS, CHAMP_LAMPS,
|
||||||
UPPER_PLAYFIELD_TIME_LAMPS, TUNNEL_NUMBER_LAMPS,
|
UPPER_PLAYFIELD_TIME_LAMPS, TUNNEL_NUMBER_LAMPS,
|
||||||
|
|||||||
Reference in New Issue
Block a user