From 1686e53b285dd009c58b263dd316dc2feef398b2 Mon Sep 17 00:00:00 2001 From: Brosef Date: Mon, 23 Jun 2025 14:45:29 +0100 Subject: [PATCH] Did more unforgivable sins --- src/gameUtils/turns.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gameUtils/turns.py b/src/gameUtils/turns.py index 9dc4fc4..81f15a2 100644 --- a/src/gameUtils/turns.py +++ b/src/gameUtils/turns.py @@ -32,8 +32,11 @@ class RoundTable(BaseTurnHandler): if teamSize > len(self._pm): raise Exception('Too little players for specified team size.') # TODO: Custom exception - self.temaSize = teamSize - self.turns //= self.temaSize + self.teamSize = teamSize + self.turns //= self.teamSize + + self.turn -= 1 + self.next() def next(self): """ @@ -46,9 +49,9 @@ class RoundTable(BaseTurnHandler): self.round += 1 self.playing = [] - playerNames = self._pm.keys() + playerNames = list(self._pm.keys()) - for i in range(self.temaSize): - self.playing.append(self._pm[playerNames[(i+self.temaSize)%len(playerNames)]]) + for i in range(self.teamSize): + self.playing.append(self._pm[playerNames[(i+self.turn)%len(playerNames)]]) return self.playing \ No newline at end of file