A simple Tic-Tac-Toe game built with React.js. The game allows two players to select either "X" or "O", enter their names, and play against each other on a 3x3 grid. The game keeps track of each player's moves and displays a message when a player wins, loses, or the game ends in a draw.
- Players can select their symbol ("X" or "O") and enter their names.
- The game board updates in real-time as players choose their moves.
- A list below the grid shows each move made by the players, including the row and column of the selected cell.
- A pop-up message appears to announce the result when a player wins, loses, or when the game ends in a draw.
Here are some screenshots of the Tic-Tac-Toe game interface:





- Enter your name in the provided text box.
- Select either "X" or "O" as your symbol.
- Take turns with your opponent to select cells on the grid.
- Watch the list below the grid for updates on each move.
- A pop-up will appear to announce the winner, or if the game ends in a draw.
-
Clone the repository:
git clone https://github.com/Mazenmarwan023/tic-tac-toe-react.git
-
Navigate to the project directory:
cd tic-tac-toe-react
-
Install the dependencies:
npm install
-
Run the development server:
npm run dev
-
Open your browser and go to
http://localhost:3000
to play the game.
- React.js
- Vite
- JavaScript (ES6+)
- CSS
This project is open-source and available under the MIT License.