https://github.com/4ssh1/tic-tac-toe
A tic-tac-toe game built with react
https://github.com/4ssh1/tic-tac-toe
components logic props react reset undo-redo useeffect usestate
Last synced: 2 months ago
JSON representation
A tic-tac-toe game built with react
- Host: GitHub
- URL: https://github.com/4ssh1/tic-tac-toe
- Owner: 4ssh1
- Created: 2024-12-04T16:02:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-29T23:21:56.000Z (about 1 year ago)
- Last Synced: 2025-10-07T20:17:05.004Z (9 months ago)
- Topics: components, logic, props, react, reset, undo-redo, useeffect, usestate
- Language: JavaScript
- Homepage: https://tic-tac-toe-pi-six-25.vercel.app
- Size: 51.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# __A Tic-tac-toe game__
A fun and interactive Tic-Tac-Toe game with additional features like undo, redo and reset functionality, making it more engaging and user-friendly.
# __Features__
- __Undo/Redo__ : Revisit previous moves or redo undone moves seamlessly.
- __Reset Game__ : Start a fresh game anytime with the reset button.
- __Winning Highlights__ : Hightlights the winning squares in green for clear visualization.
# Technologies Used
- __React__
# How to Play
1. Players take turns marking a square with "X" or "O"
2. The first player to get three in a row (horizontally, vertically or diagonally) wins.
3. Use the __undo__ and __redo__ buttons to revisit moves.
4. Click __reset__ to start a new game.
## Installation
To get started, follow these steps:
1. Clone the repository:
```bash
git clone https://github.com/4ssh1/Tic-tac-toe.git
cd Tic-tac-toe
```
2. Install dependencies:
```bash
npm install
```
3. Start the server:
```bash
npm run dev
```
# Tic-tac-toe Project Structure
```text
Tic-tac-toe/
├── public/ # Static files
├── src/
│ ├── components/ # React components
│ │ └── Board.js # Game board logic
│ │ └── Square.js # Individual square component
│ ├── App.js # Main application component
│ ├── index.js # React entry point
│ └── styles.css # Styling for the game
├── package.json # Project metadata and dependencies
├── README.md # Project documentation
└── .gitignore # Ignored files in Git
```
## Contributing
We welcome contributions! To contribute:
1. Fork the repository.
2. Create a new branch:
```bash
git checkout -b feature-name
```
3. Commit your changes and push them to your fork.
4. Create a pull request.
# License
This project is licensed under the MIT license.