An open API service indexing awesome lists of open source software.

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

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.