waiting
user click
valid move?
no
update board state
update possible moves
do computer move
yes
game finished?
user won?
win screen
game over screen
who's next turn?
computer
user