Skip to content

Commit

Permalink
Update tic_tac_toe.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Coding4Hours authored Jul 9, 2024
1 parent be29037 commit 21cf8b0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tic_tac_toe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 21cf8b0

Please sign in to comment.