This project is a simple implementation of the classic Tic Tac Toe game built with React. It allows two players to play the game in turns on the same computer. The game automatically detects the winner and can be restarted at any time.
- A 3x3 game board
- Turn-based gameplay for two players
- Highlights the winner's combination
- A restart button to play again
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
Before you begin, ensure you have the following installed:
-
Clone the repository:
git clone https://github.com/sanjaysathyarapu/CMPE282-HW1.git
-
Navigate to the project directory:
cd CMPE282-HW1
-
Install dependencies:
npm install
-
Start the development server:
npm start
This runs the app in development mode. Open http://localhost:3000 to view it in the browser.
How to Play: The game is played on a grid that's 3 squares by 3 squares. Two players take turns playing by entering their symbol (X or O) in an empty square. The first player to get 3 of their symbols in a row (up, down, across, or diagonally) is the winner. When all 9 squares are full, the game is over. If no player has 3 marks in a row, the game ends in a tie.