A simple console-based Tic-Tac-Toe game in JavaScript. Play against the computer and see if you can win!
- Clone the repository to your local machine:
git clone https://github.com/your-username/Tic-Tac-Toe.git
Use npm install
and it will Install the required dependencies.
npm install
node game.js
The game will prompt you to enter the row and column (1, 2, or 3) where you want to place your "X." Type the row number, press Enter, and then type the column number and press Enter again.
The computer will take its turn and place its "O" randomly.
Continue playing until either you or the computer wins, or the board is full (resulting in a tie).
To exit the game at any time, press Ctrl + C or close the terminal.
Contributions are welcome! If you have suggestions, feature requests, or bug reports, please open an issue or submit a pull request. Let's make this Tic-Tac-Toe game even better together!