abhijithu1 / tic-tac-toe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tic-tac-toe

Welcome to the Tic Tac Toe React Application! This is a simple implementation of the classic Tic Tac Toe game using React.js.

Features

  • 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.

Installation

To run the Tic Tac Toe React Application locally, follow these steps:

  1. Clone this repository to your local machine:

  2. Navigate into the project directory:

cd my-app
  1. Install dependencies using npm or yarn:
npm install

or

yarn install
  1. 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).

How to Play

  1. Open the application in your web browser.
  2. You'll see a 3x3 grid representing the Tic Tac Toe board.
  3. Player 1 starts the game by clicking on any empty cell to place their symbol (X).
  4. Player 2 then takes their turn, placing their symbol (O) in an empty cell.
  5. 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.
  6. To start a new game, simply click the "Restart" button.

Enjoy playing Tic Tac Toe!

About


Languages

Language:JavaScript 47.6%Language:CSS 46.0%Language:HTML 6.4%