This is a simple command-line implementation of the game Tic-Tac-Toe using Node.js.
- Clone the repository:
git clone https://github.com/your-username/tic-tac-toe-node.git
git clone [email protected]:IvanLivshits/tic-tac-toe-node.git
- Navigate to the project directory:
cd tic-tac-toe-node
- Copy the .env.template file:
cp .env.template .env
- Install dependencies:
npm install
To start the game, run the following command:
npm run play
Follow the prompts to enter your moves and play the game. The game will display the board and ask you to enter the row and column for your move. The board will be updated accordingly, and the game will continue until a winner is determined or the game ends in a draw.
The game follows the standard rules of Tic-Tac-Toe. Players take turns marking empty cells on a 3x3 grid with their respective symbols (X or O). The first player to form a horizontal, vertical, or diagonal line with their symbol wins the game. If all cells are filled and no player has won, the game ends in a draw.
This project is licensed under the MIT License.
Feel free to contribute, raise issues, and submit pull requests to improve the game!
Enjoy playing Tic-Tac-Toe!