Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.45 KB

README.md

File metadata and controls

32 lines (21 loc) · 1.45 KB

TicTacToe

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!

Fixed issues:

  • 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

New features added:

  • User can choose type of player (human or computer)
  • User can choose which player goes first
  • User can choose which symbol each player uses

To-do list:

  • 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

To play the game

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!

Code testing

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.