Skip to content

A simple and interactive Tic Tac Toe game implemented using HTML, CSS, and JavaScript

Notifications You must be signed in to change notification settings

Vishalshukla6395/Tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Game

A simple and interactive Tic Tac Toe game implemented using HTML, CSS, and JavaScript. This game allows two players to take turns playing the classic Tic Tac Toe game, with functionality to detect wins, draws, and restart the game.

Features

  • Two-player gameplay: Players take turns clicking on boxes to place "X" or "O" on the grid.
  • Win and Draw detection: The game detects when a player wins or when the game ends in a draw.
  • Popup message: Displays a winning message or a draw notification when the game ends.
  • Restart functionality: Allows players to restart the game without reloading the page.

Demo

You can play the game directly from the live link:
Play Tic Tac Toe

How to Play

  1. Click the "Play Tic Tac Toe" link given above, the game will be open in your browser.
  2. The game board will display a 3x3 grid of boxes.
  3. Player 1 will use "X" and Player 2 will use "O".
  4. Players take turns by clicking on any empty box.
  5. The game ends when one player wins or when all spots are filled (a draw).
  6. To start a new game, click the Restart button below the game grid.

Installation

To run this project locally:

  1. Clone this repository:

    git clone https://github.com/vishalshukla6395/tic-tac-toe.git
  2. Navigate to the project directory:

    cd tic-tac-toe
  3. Open the index.html file in your browser to play the game.

Technologies Used

  • HTML: Used for structuring the web page.
  • CSS: Used for styling the game board and layout.
  • JavaScript: Used for implementing game logic and interactivity.

About

A simple and interactive Tic Tac Toe game implemented using HTML, CSS, and JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published