-
Created with Javascript, open the index.html file and then hit OPTION + COMMAND + J to open the console on Mac, or CTRL + SHIFT + J on Windows.
-
Game will automatially load in the console. First player is assigned as X, second player O.
-
The board co-ordinates are provided to you as a guide so players know where they can place their markers.
-
To place a marker, players take in turn typing playerTurn and the position where they would like to go, eg, if they wanted to place their marker on the top left corner, they would type playerTurn(0).
-
After a winner is announced, type resetBoard() to play again.
-
If there is a draw the game board will automatically reset.
-
Players can't put a marker in a square that is already taken by another players marker.
- The game is played on a grid that's 3 squares by 3 squares.
- Player 1 is X, Player 2 is O. Players take turns putting their marks in empty squares.
- The first player to get 3 of their marks in a row (up, down, across, or diagonally) is the winner.
- When all 9 squares are full and no player has 3 marks in a row, the game ends in a draw.
- Players are able to reset after a player has won, or automatically resets if the game results in a draw.