Randomize first player after overwritting print/input
This commit is contained in:
parent
4489c95ddc
commit
30513c6acd
@ -26,8 +26,6 @@ class Game():
|
||||
else:
|
||||
self.players.append(Computer(self.board))
|
||||
|
||||
random.shuffle(self.players)
|
||||
|
||||
@property
|
||||
def player1(self):
|
||||
if type(self.players[0]) == Computer:
|
||||
@ -49,6 +47,10 @@ class Game():
|
||||
return self.players[(self.round + 1) % 2]
|
||||
|
||||
|
||||
def ready(self):
|
||||
random.shuffle(self.players)
|
||||
|
||||
|
||||
def isFinished(self):
|
||||
return self.board.isFinished() or self.player1.cantpioche or self.player2.cantpioche
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user