Did more unforgivable sins
This commit is contained in:
@ -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
|
||||
Reference in New Issue
Block a user