This repository contains a simple Tic Tac Toe game where the user can play indefinitely against the CPU. The game keeps track of scores on a scoreboard and provides options to reset the game. Built using HTML, CSS, and JavaScript, this project delivers a responsive and interactive experience for players.
- Player vs CPU Gameplay: Engage in an endless Tic Tac Toe match against an AI opponent.
- Scoreboard Tracking: The scoreboard dynamically updates and displays the scores for both the player and the CPU.
- Reset Button: Allows the user to reset the scores and start a new game instantly.
- Browser Refresh Behavior: Refreshing the browser resets the scores back to 0-0.
- Responsive Design: Compatible with different screen sizes for seamless gameplay on mobile and desktop.
- HTML - Structure of the game.
- CSS - Styling for visual appeal and responsiveness.
- JavaScript - Game logic, AI behavior, and interactivity.
- Clone the repository:
https://github.com/anirudh-singh01/Tic-Tac-Toe-Game.git
- Navigate to the project folder:
cd tic-tac-toe
- Open the index.html file:
open index.html
Alternatively, you can open the file in your web browser.
- Open the game in your browser.
- Click on any empty cell to make your move.
- The CPU automatically makes its move after yours.
- Continue playing until there is a winner or the game results in a draw.
- The scoreboard updates based on wins, losses, and draws.
- Use the Reset button to clear the scores and start a new match.
- Refreshing the browser resets the scoreboard to 0-0.
├── index.html # Main HTML file
├── style.css # CSS styles for layout and design
├── script.js # JavaScript code for game logic
└── README.md # Project documentation
- Add different difficulty levels for the CPU.
- Implement a multiplayer mode for two players.
- Store scores using LocalStorage to persist data even after browser refresh.
- Add animations and sound effects for a more engaging experience.
Contributions are welcome! If you'd like to improve this project, feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License.
Anirudh Singh
GitHub Profile