Skip to content

The Tic Tac Toe game is a classic two-player game where players take turns to place their marks ("X" or "O") on a 3x3 grid. The game detects a winner when a player successfully places three marks in a row, column, or diagonal, or declares a draw when the grid is full without a winner. It provides buttons to reset the game and start a new game.

Notifications You must be signed in to change notification settings

SnehaThange17/Tic_Tac_Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Game

This repository contains files for a simple Tic Tac Toe game implemented in HTML, CSS, and JavaScript. Players can play against each other, taking turns to place their "X" or "O" marks on the grid. The game detects a winner when a player successfully places three marks in a row, column, or diagonal, or declares a draw when the grid is full without a winner.

Files Included:

  1. index.html:

    • Contains the structure and layout of the Tic Tac Toe game.
    • Includes a 3x3 grid of buttons representing the game board.
    • Displays a message container for announcing the winner or a draw.
    • Includes buttons for resetting the game and starting a new game.
  2. style.css:

    • Defines the styles for the elements in the Tic Tac Toe game, including layout, colors, and responsiveness.
  3. app.js:

    • Implements the functionality of the Tic Tac Toe game.
    • Handles player turns, marking the grid, checking for a winner, and declaring the outcome of the game.

Instructions:

To play the Tic Tac Toe game:

  1. Open index.html in a web browser.
  2. Players take turns clicking on the grid buttons to place their marks ("X" or "O").
  3. The game detects a winner when a player successfully places three marks in a row, column, or diagonal.
  4. If the grid is full without a winner, the game declares a draw.
  5. Click the "Reset Game" button to restart the game without resetting the score.
  6. Click the "New Game" button to reset the game and start a new game.

Developer:

This Tic Tac Toe game is developed by Sneha Thange.

UI:

Screenshot 2024-05-16 000820

About

The Tic Tac Toe game is a classic two-player game where players take turns to place their marks ("X" or "O") on a 3x3 grid. The game detects a winner when a player successfully places three marks in a row, column, or diagonal, or declares a draw when the grid is full without a winner. It provides buttons to reset the game and start a new game.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published