Project Tic-Tac-Toe Command Line version

build a Tic-Tac-Toe game in the command line interface. Two players, X and O are gonna take turns in picking their next move by entering the numbers in the command line.

2 parts:- 1 for the test cases. Another an actual build game.

How to Play Tic-Tac-Toe - tic-tac-toe.js

To run code that would capture the user's input, we will need to run it by typing command in the terminal. Please open in the integrated “Terminal” at the VSCode, and type the command for running the code.

  1. npm install, if want to update dependencies
  2. npm install prompt-sync
  3. click "Run Code" in VSCode or node file-path-name
  4. To quit the game, ctrl + c

tic-tac-toe.js ( Build the Game Play)

  1. Open the tic-tac-toe.js file in the project folder in VSCode.
  2. Replace all the functions in this file with the functions you implemented in Part 1 (i.e. remove line 1-63, and replace with the code from tic-tac-toe_Part1.js without test cases)

tic-tac-toe_Part1.js

This part is to make sure all the test cases of that function are passed. You can run the tests by running node tic-tac-toe_Part1.js in the command line.

○ validateMove ○ markBoard ○ winCombinations and checkWin ○ checkFull ○ printBoard (No automated test cases)

If you are seeing "All tests passed! Congratulations!" in the console output, then you have successfully implemented all the functions. Congratulations!