From 21cf8b068e76fa76fc68f1cbff26c068a497d1ca Mon Sep 17 00:00:00 2001 From: Coding4Hours <138321129+Coding4Hours@users.noreply.github.com> Date: Mon, 8 Jul 2024 17:46:43 -0700 Subject: [PATCH] Update tic_tac_toe.py --- tic_tac_toe.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tic_tac_toe.py b/tic_tac_toe.py index d55bfed..3a61695 100644 --- a/tic_tac_toe.py +++ b/tic_tac_toe.py @@ -3,10 +3,8 @@ #a = {} def update_board(board, move, player): - if board[move] == 'X' or board[move] == 'O': + if move not in board or board[move] in ['X', 'O']: return False - #a[move] = move - board[move] = player return True def check_winner(board):