Activate Playerlamps on start
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
import logging
|
import logging
|
||||||
|
from lamps.LampGroup import PLAYER_LAMPS
|
||||||
|
|
||||||
class GameState:
|
class GameState:
|
||||||
def __init__(self, players, highscore, currentPlayerID = 0):
|
def __init__(self, players, highscore, currentPlayerID = 0):
|
||||||
self.players = players
|
self.players = players
|
||||||
self.gameStateID = currentPlayerID
|
self.gameStateID = currentPlayerID
|
||||||
self.highscore = highscore
|
self.highscore = highscore
|
||||||
|
PLAYER_LAMPS.activateNext()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def currentPlayer(self):
|
def currentPlayer(self):
|
||||||
@@ -22,4 +24,7 @@ class GameState:
|
|||||||
self.players.remove(savedPlayer)
|
self.players.remove(savedPlayer)
|
||||||
self.players.append(savedPlayer)
|
self.players.append(savedPlayer)
|
||||||
|
|
||||||
|
PLAYER_LAMPS.deactivateCurrent()
|
||||||
|
PLAYER_LAMPS.activateNext()
|
||||||
|
|
||||||
self.gameState.currentPlayer.activate()
|
self.gameState.currentPlayer.activate()
|
||||||
|
|||||||
@@ -33,6 +33,13 @@ class LampGroup:
|
|||||||
|
|
||||||
self.currentLamp -= 1
|
self.currentLamp -= 1
|
||||||
|
|
||||||
|
PLAYER_LAMPS = LampGroup([
|
||||||
|
Lamp("Can Play 1"),
|
||||||
|
Lamp("Can Play 2"),
|
||||||
|
Lamp("Can Play 3"),
|
||||||
|
Lamp("Can Play 4")
|
||||||
|
])
|
||||||
|
|
||||||
CHAMP_LAMPS = LampGroup([
|
CHAMP_LAMPS = LampGroup([
|
||||||
Lamp("C Of Champ"),
|
Lamp("C Of Champ"),
|
||||||
Lamp("H Of Champ"),
|
Lamp("H Of Champ"),
|
||||||
|
|||||||
Reference in New Issue
Block a user