/Tic_Tac_Toe_Game

The Tic-Tac-Toe Game project is an interactive web-based implementation of the classic Tic-Tac-Toe game using HTML, CSS, and JavaScript. It allows two players to compete against each other in a virtual grid, marking X or O on the cells until a winner is determined or the game ends in a draw.

Primary LanguageJavaScript

Tic-Tac-Toe Game

A simple Tic-Tac-Toe game built using HTML, CSS, and JavaScript.

Demo

You can play the game live here.

Features

  • Interactive game board
  • Two players (X and O)
  • Win detection and game over state
  • Reset option to start a new game

Technologies Used

  • HTML
  • CSS
  • JavaScript

Getting Started

These instructions will help you get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You will need a web browser to run the game. Make sure you have one installed.

Installation

  1. Clone the repository:

  2. Navigate to the project directory:

  3. Open index.html in your web browser.

How to Play

  1. Open the game in your web browser.

  2. The game board will be displayed, with a 3x3 grid.

  3. Player X starts the game. Click on an empty cell in the grid to place your marker (X or O).

  4. Alternate turns with the other player, clicking on empty cells to place markers.

  5. The first player to get three of their markers in a horizontal, vertical, or diagonal row wins the game.

  6. If all cells are filled and no player has won, the game ends in a draw.

  7. To start a new game, click on the "Reset" button.