Hi!
I recently decided I want to play Tic Tac Toe -- but unfortunately none of my friends want to.
I thought of the next best thing -- a fully functional Tic Tac Toe board in Algodoo, with an AI opponent?
While I'm at it, I'm throwing on an additional challenge: Any scene.my variables are strictly forbidden.
HOW TO PLAY
This is a classic game of Tic Tac Toe -- whichever player gets 3 of their symbol in a row wins!
When a player wins, the board will light up green and every square will fill with the winner's symbol (so if X wins, the board will fill with X's).
When a tie occurs, the board will clear itself and light up red.
After an end condition (win/tie) is reached, the board will reset itself after 2 seconds.
To place a symbol, simply click on a blank square -- it's as easy as that!
The current player's turn shows up in the top left.
To reset the board, click the gray "RESET" button below the turn indicator.
By default, AI mode is enabled.
When AI mode is enabled, the AI takes all O turns.
The AI is very simple.
It simply checks all possible moves it can make -- and if the move results in a state where the player can win, it discards it.
If the move causes the AI to win, it chooses it immediately.
And if the AI has no moves that ensure the player can't win, it gives up and throws a random move.
To disable the AI mode (for either playing against yourself or a friend!), untick the "AI mode" checkbox.
A game tree AI would certainly be much better, but we have to work with what we have.
2017 - 2025 Little (Random Scene)
Any item in my scenes can be used freely with credit
Have Phun!
EDIT: Made it smaller