/Tic-Tac-Toe

Tic-Toc Game is a classic two-player strategy game implemented in Python. Enjoy endless hours of entertainment with Tic-Toc Game!

Primary LanguagePython

Tic-Tac-Toe Game

Overview

This is a simple implementation of the classic Tic-Tac-Toe game. It allows two players to take turns marking spaces on a 3x3 grid with "X" and "O" until one player wins or the game ends in a draw.

Features

  • Two-player mode: Play with a friend on the same computer.
  • Interactive grid: Click on the cells to make your move.
  • Win detection: The game detects when a player has won and announces the winner.
  • Draw detection: The game ends in a draw when there are no more empty cells.
  • Restart option: Start a new game after the current one ends.

How to Play

  1. Clone or download the repository to your local machine.
  2. Open the index.html file in a web browser.
  3. Player 1 (X) goes first.
  4. Click on an empty cell to make your move.
  5. Alternate turns with your opponent.
  6. The game announces the winner or ends in a draw.