This is a simple Tic Tac Toe game built using React.js. It allows two players to take turns and play the game on a 3x3 grid. The game also includes a win condition detection, which announces the winner or a draw.
To run this game on your local machine, follow these steps:
-
Clone the repository to your local machine using the following command:
git clone https://github.com/IPH-Technologies-Pvt-Ltd/Tic-Tac-Toe-ReactJs.git
-
Navigate to the project directory:
cd tic-tac-toe
-
Install the required dependencies:
npm install
-
Start the development server:
npm start
-
Open your web browser and visit
http://localhost:3000
to play the game.
- The game starts with Player 1 (X) making the first move.
- Players take turns by clicking on an empty cell in the grid.
- The game detects a win condition (three in a row/column/diagonal) and announces the winner.
- If all cells are filled without a win condition, the game declares a draw.
- To restart the game, click the "Restart" button.
- React.js - JavaScript library for building user interfaces
- CSS - Styling the game components
- HTML - Structure and layout of the game board
Contributions are welcome! If you find any issues or want to add new features, feel free to open a pull request. Please make sure to follow the code style and include relevant tests.
This project is licensed under the MIT License.
The initial implementation of this Tic Tac Toe game was inspired by the official React.js tutorial. Many thanks to the React.js community for their contributions and support.
If you have any questions, feel free to contact the project maintainer at hr@iphtechnologies.com.
Enjoy playing the game!