This JavaScript program was built with a focus on developing best practices in Test Drive Development. Using the built-in CLI Readline module, the program can be played in your terminal or command console!
- Installation
- Testing Framework
- Playing the game
In order to play, you will need to have Node.js installed. MacOS:
Windows:
To begin, fork this repository and clone it into your local drive. Once you clone it, open up your terminal/command line and CD into the folder
The programs uses the Mocha.js testing framework, along with the built-in Node assertion library.
The limitation to this game is that all player inputs must be valid numbers from 1-9. When playing the game, you are shown a board like this:
- Player X makes the first move, followed by Player O.
- There are only 9 spaces where you can place your designated token.
- The first player to place their token three in a row wins the game.
- In the event players fill the board without a winner, it's a draw.
Enter the number on the grid where you want to place your token. If there is a winner or the game ends in a draw, the program will end. If you wish to continue playing, restart the program with node ticTacToe