Noughts And Crosses With Animated GIFsAbout Blog Projects
Right, let's get the obvious out of the way. Otherwise known as "Tic Tac Toe", "Noughts and Crosses" involves making a line of three in any direction, preventing your opponent from doing the same. The board can be played with a friend or against the computer. If you are against the computer, you can select which moves it can play from the checkboxs at the side.
The Computer's Moves
The computer can make one of seven moves, each of varying complexity. They are arranged so that the most important moves are checked first, ending with the least important. For example, it is a much better idea to block a win than play a random move, so if the block is allowed, do that first! Other than blocking and winning, the computer can also perform or block a fork. A fork is a move that ensures a definate win, by giving the opponent two potential wins to block at once. The image on the left shows a fork where the player can win either by placing their counter in the bottom-right corner or the bottom -middle cell.
The easiest moves the computer can do are making or blocking two in a row and playing a random move. Since a move has to be made, this option can not be disabled.
Playing The Game
To start the game simply click on any free square. Once the game has finished, you can either reload a new round or reset the game altogether using the links below the board. Feel free to experiment with it, the computer should be impossible to beat with all the checkboxes selected!