Did more unforgivable sins
This commit is contained in:
@ -32,8 +32,11 @@ class RoundTable(BaseTurnHandler):
|
|||||||
if teamSize > len(self._pm):
|
if teamSize > len(self._pm):
|
||||||
raise Exception('Too little players for specified team size.') # TODO: Custom exception
|
raise Exception('Too little players for specified team size.') # TODO: Custom exception
|
||||||
|
|
||||||
self.temaSize = teamSize
|
self.teamSize = teamSize
|
||||||
self.turns //= self.temaSize
|
self.turns //= self.teamSize
|
||||||
|
|
||||||
|
self.turn -= 1
|
||||||
|
self.next()
|
||||||
|
|
||||||
def next(self):
|
def next(self):
|
||||||
"""
|
"""
|
||||||
@ -46,9 +49,9 @@ class RoundTable(BaseTurnHandler):
|
|||||||
self.round += 1
|
self.round += 1
|
||||||
|
|
||||||
self.playing = []
|
self.playing = []
|
||||||
playerNames = self._pm.keys()
|
playerNames = list(self._pm.keys())
|
||||||
|
|
||||||
for i in range(self.temaSize):
|
for i in range(self.teamSize):
|
||||||
self.playing.append(self._pm[playerNames[(i+self.temaSize)%len(playerNames)]])
|
self.playing.append(self._pm[playerNames[(i+self.turn)%len(playerNames)]])
|
||||||
|
|
||||||
return self.playing
|
return self.playing
|
||||||
Reference in New Issue
Block a user