Computer player speaks move
This commit is contained in:
parent
f10c39531f
commit
aef53d4689
|
@ -23,7 +23,9 @@ class TTTComputerPlayer:
|
||||||
|
|
||||||
def choose_move(self, game):
|
def choose_move(self, game):
|
||||||
"Chooses a random move from the moves available."
|
"Chooses a random move from the moves available."
|
||||||
return random.choice(game.get_valid_moves())
|
move = random.choice(game.get_valid_moves())
|
||||||
|
print(f"{self.name} chooses {move}.")
|
||||||
|
return move
|
||||||
|
|
||||||
def get_symbol(self, game):
|
def get_symbol(self, game):
|
||||||
"Returns this player's symbol in the game."
|
"Returns this player's symbol in the game."
|
||||||
|
|
Loading…
Reference in New Issue