ich will fertig werden

This commit is contained in:
Jonas Zeunert
2022-09-01 00:45:17 +02:00
parent 0dea250e44
commit 175265be84
2 changed files with 5 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ import asyncio
import threading
class GameState:
playerCount = 0
players = None
credits = config.BALLS_PER_GAME
isPlaying = False
@@ -44,9 +45,11 @@ class GameState:
def endGame(self):
self.writeHighscore()
self.players = None
self.playerCount = 0
self._currentPlayer = self.dummyPlayer
self.isPlaying = False
self.isStarted = False
logging.info("Game ended")
self.startIdleLoop()
@@ -89,6 +92,7 @@ class GameState:
self.deactivate_all()
def createPlayers(self, playerCount):
self.playerCount = playerCount
players = []
for i in range(playerCount):
player = self.playerStateFactory.createPlayerState(i)