Skip to content

biswarup-naha/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Game

This is a simple Tic Tac Toe game implemented in HTML, CSS, and JavaScript. The game allows two players to take turns marking the spaces in a 3x3 grid to achieve a row, column, or diagonal of their symbol ('X' or 'O').

Features

  • Two-player mode: Play against another player on the same device.
  • Win detection: Automatically detects when a player has won or when the game ends in a draw.
  • Score tracking: Keeps track of the number of wins for each player.
  • Score history: Stores the history of games played, including scores and outcomes, in local storage.

How to Play

  1. Clone or download the repository to your local machine.
  2. Open the index.html file in your web browser.
  3. Start a new game by clicking one of the boxes.
  4. Players take turns clicking on empty spaces to mark them with their symbol ('X' or 'O').
  5. The game automatically detects when a player has won or when the game ends in a draw.

Technologies Used

  • HTML: Structure of the game board and user interface.
  • CSS: Styling and layout of the game board and user interface.
  • JavaScript: Game logic and interactivity.
  • Local Storage: Storing score history locally on the user's device.

License

This project is licensed under the MIT License. See the LICENSE file for details.