Questions tagged [tic-tac-toe]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
46 views

CS50ai tic tax toe need help with

I am working on the tic tac toe assignment. I do not understand why this program does not work. When I run it and choose X and place the first letter, it crashes and I get a NoneType object is not ...
user avatar
0 votes
0 answers
27 views

In Lab0 - Tic-Tac-Toe, calling the result function causes the error "local variable 'result' referenced before assignment"

I have the following code in the tictactoe module: def result(board, action): nextPlayer = player(board) board[action[0]][action[1]]=nextPlayer return board This works fine when called ...
user avatar
1 vote
1 answer
1k views

CS50AI Tic tac toe game with minimax algorithm: I keep receive Invalid move

So my code run, but only the first move, after that I keep getting "Invalid move" message (which was declared by myself) in my result function. I'm not sure what's wrong with my result function, or I ...
user avatar