This project is a classic Tic-Tac-Toe game built using React. It demonstrates the use of React components, state management, and handling user interactions through a simple yet interactive game.
- Play Tic-Tac-Toe with a friend or against yourself
- Highlights the winning combination
- Resets the game with a button click
-
Clone the Repository:
git clone https://github.com/sorooshaghaei/react-tic-tac-toe.git
-
Navigate to the Project Directory:
cd react-tic-tac-toe
-
Install the Required Dependencies:
npm install
-
Run the Application:
npm start
- Open the application in your browser.
- Play the Game: Click on the squares to make a move. The game will automatically detect the winner or a draw.
- Reset the Game: Click the "Restart" button to start a new game.
/src/components
- Contains React components likeGame.jsx
,andBoard.jsx
./src/styles
- Contains CSS files for styling.App.js
- The main component that renders the game.index.js
- Entry point of the application.
- React 17.x or later
- Node.js 14.x or later
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.