This project resulted from a coding challenge to improve upon a pretty janky command-line game. I fixed several known issues and implemented requested features, described below. Although I successfully passed the challenge, I have a few additional goals for making the game even better!
- Gracefully handled bad user input
- Increased difficulty level to 'hard'
- Improved user experience of gameplay with smoother transitions between moves, delay before computer moves, clearer user messages
- User can choose type of player (human or computer)
- User can choose which player goes first
- User can choose which symbol each player uses
- Refactor game brain focusing on efficiency
- Add different difficulty levels: easy, medium, hard
- Allow user to select desired difficulty level
- Create webpage to allow game to be played in a GUI
Fork or clone the repository to your machine.
This game runs in Node and was developed with version 10.9.0
. If not installed, Node can be downloaded directly from its website.
After downloading, run node game.js
in the terminal and follow the directions!
Tic Tac Toe uses Jasmine as a testing framework. To run or edit the tests, first install dependencies with npm install
, then run the tests with npm test
.