From aef53d46890fad894e3474abf3927b20855a08f3 Mon Sep 17 00:00:00 2001 From: Chris Proctor Date: Thu, 28 Apr 2022 19:14:40 -0400 Subject: [PATCH] Computer player speaks move --- ttt_player.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ttt_player.py b/ttt_player.py index c130775..16ea290 100644 --- a/ttt_player.py +++ b/ttt_player.py @@ -23,7 +23,9 @@ class TTTComputerPlayer: def choose_move(self, game): "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): "Returns this player's symbol in the game."