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.
-
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.
-
style.css:
- Defines the styles for the elements in the Tic Tac Toe game, including layout, colors, and responsiveness.
-
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.
To play the Tic Tac Toe game:
- Open
index.html
in a web browser. - Players take turns clicking on the grid buttons to place their marks ("X" or "O").
- The game detects a winner when a player successfully places three marks in a row, column, or diagonal.
- If the grid is full without a winner, the game declares a draw.
- Click the "Reset Game" button to restart the game without resetting the score.
- Click the "New Game" button to reset the game and start a new game.
This Tic Tac Toe game is developed by Sneha Thange.