Skip to content

fedorovvvv/tic-tac-toe-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe NodeJS

This is a simple command-line implementation of the game Tic-Tac-Toe using Node.js.

Installation

  1. 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

  1. Navigate to the project directory:

cd tic-tac-toe-node

  1. Copy the .env.template file:

cp .env.template .env

  1. Install dependencies:

npm install

Usage

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.

Game Rules

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.

License

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published