Compare commits

...

2 Commits

Author SHA1 Message Date
Jonas Zeunert
4c2b4f310e Activate Playerlamps on start 2022-06-06 18:46:58 +02:00
Jonas Zeunert
394f764961 Fix special display padding 2022-06-06 18:31:31 +02:00
3 changed files with 14 additions and 2 deletions

View File

@@ -1,10 +1,12 @@
import logging
from lamps.LampGroup import PLAYER_LAMPS
class GameState:
def __init__(self, players, highscore, currentPlayerID = 0):
self.players = players
self.gameStateID = currentPlayerID
self.highscore = highscore
PLAYER_LAMPS.activateNext()
@property
def currentPlayer(self):
@@ -22,4 +24,7 @@ class GameState:
self.players.remove(savedPlayer)
self.players.append(savedPlayer)
PLAYER_LAMPS.deactivateCurrent()
PLAYER_LAMPS.activateNext()
self.gameState.currentPlayer.activate()

View File

@@ -8,8 +8,8 @@ class SpecialDisplay(Display):
self.ballsToPlay = 0
def printScore(self):
super().printContent(str(self.credits).zfill(2)
+ str(self.gameTimeBonus).zfill(2)
super().printContent(str(self.credits).zfill(3)
+ str(self.gameTimeBonus).zfill(3)
+ str(self.ballsToPlay).zfill(2))
def printBallsToPlay(self, ballsToPlay):

View File

@@ -33,6 +33,13 @@ class LampGroup:
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([
Lamp("C Of Champ"),
Lamp("H Of Champ"),