This is a simple Tic-Tac-Toe game implemented using HTML, CSS, and JavaScript.
- Open the
index.html
file in your web browser. - The game will start with X being the first player.
- Click on any of the empty boxes to place your mark (X or O).
- The game will alternate turns between X and O.
- The first player to get three of their marks in a row (horizontally, vertically, or diagonally) wins the game.
- If all the boxes are filled and there is no winner, the game ends in a draw.
- Click the "PLAY AGAIN" button to reset the game and start over.
- Keeps track of the score for X and O.
- Uses localStorage to persist the score even after the page is refreshed or reopened.
- Provides visual feedback for the current player's turn.
- Displays a message announcing the winner or indicating a draw.
index.html
: Contains the structure of the game interface.style.css
: Defines the styling for the game elements.script.js
: Contains the JavaScript code for game logic and functionality.
The game interface features a clean and simple design with a black header and a grid layout for the Tic-Tac-Toe board. The X's and O's are displayed within each grid cell, and the score is presented at the top of the page.
- HTML
- CSS
- JavaScript
Enjoy playing Tic-Tac-Toe! Feel free to customize and modify the game as you wish.s