Welcome to my React Tic-Tac-Toe project! This README will give you an overview of how the project works.
Check Live - https://4gm45r-5173.csb.app/
This project is a simple implementation of the classic game of Tic-Tac-Toe using React. It allows two players to take turns marking squares on a 3x3 grid to win the game. Here's how it works:
-
Player Names: At the beginning of the game, you can set the names of Player 1 (X) and Player 2 (O) by clicking the "Edit" button next to each player's name.
-
Game Board: The game board consists of a 3x3 grid. Players take turns clicking on an empty square to place their symbol (X or O). Once a square is chosen, it cannot be selected again.
-
Winning: The game continues until one player has three of their symbols in a row horizontally, vertically, or diagonally, or until all squares are filled, resulting in a draw.
-
Game Over: When the game ends with a winner or a draw, a "Game Over" message is displayed, along with an option to start a new game.
To run the project locally, follow these steps:
-
Clone the repository to your local machine.
-
Open a terminal and navigate to the project directory.
-
Run the following command to install dependencies:
npm install