Welcome to the Tic Tac Toe React Application! This is a simple implementation of the classic Tic Tac Toe game using React.js.
- Two-player gameplay: Play against a friend locally on the same device.
- Interactive UI: Enjoy a user-friendly interface designed with React components.
- Win detection: The game automatically detects wins, draws, and allows for easy resetting of the board.
To run the Tic Tac Toe React Application locally, follow these steps:
-
Clone this repository to your local machine:
-
Navigate into the project directory:
cd my-app
- Install dependencies using npm or yarn:
npm install
or
yarn install
- Start the application:
npm start
or
yarn start
The application should now be running locally on [http://localhost:3000](http://localhost:3000/tic-tac-toe)
.
- Open the application in your web browser.
- You'll see a 3x3 grid representing the Tic Tac Toe board.
- Player 1 starts the game by clicking on any empty cell to place their symbol (X).
- Player 2 then takes their turn, placing their symbol (O) in an empty cell.
- Players continue taking turns until one player wins by getting three of their symbols in a row horizontally, vertically, or diagonally, or until the board is filled, resulting in a draw.
- To start a new game, simply click the "Restart" button.
Enjoy playing Tic Tac Toe!