From cf366e02c97ee995810a55556abb572acd88bfc0 Mon Sep 17 00:00:00 2001 From: Chris Proctor Date: Fri, 6 May 2022 17:01:30 -0400 Subject: [PATCH] ttt_game must copy old board position, using lists --- ttt_game.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ttt_game.py b/ttt_game.py index afd26c5..a8a9b71 100644 --- a/ttt_game.py +++ b/ttt_game.py @@ -20,7 +20,7 @@ class TTTGame: In the resulting state, the current player's symbol has been placed in an empty board space, and it is the opposite player's turn. """ - new_board = state["board"] + new_board = state["board"].copy() new_board[action] = state["player"] if state["player"] == "O": new_player = "X"