A classic Tic-Tac-Toe game built using HTML, CSS, and JavaScript. This project allows two players to play against each other in the browser with an interactive and clean user interface.
- Interactive Gameplay: Smooth and responsive grid for placing X's and O's.
- Win Logic: Automatically detects when a player wins horizontally, vertically, or diagonally.
- Draw Detection: Alerts players when the game ends in a draw.
- Reset Functionality: Quickly restart the game without reloading the page.
- Responsive Design: Playable on desktop and mobile browsers.
- HTML5: For the structure of the game board.
- CSS3: For styling the board, cells, and animations.
- JavaScript: For the game logic, turn management, and win calculations.
TIC-TAC_TOE-Game/
โโโ index.html # Main HTML file serving the game structure
โโโ style.css # Stylesheet for game aesthetics
โโโ app.js # JavaScript file containing game logic
โโโ README.md # Project documentation
๐ How to Run Locally
You can run this project on your local machine by following these simple steps:
Clone the repository:
Bash
git clone [https://github.com/ASHISHBVB/TIC-TAC_TOE-Game.git](https://github.com/ASHISHBVB/TIC-TAC_TOE-Game.git)
Navigate to the project directory:
Bash
cd TIC-TAC_TOE-Game
Open the game:
Locate the index.html file in the folder.
Double-click it to open it in your default web browser (Chrome, Firefox, Safari, etc.).
๐ฎ How to Play
The game starts with Player X.
Click on any empty cell in the 3x3 grid to place your mark.
Players take turns alternating between X and O.
The first player to get 3 marks in a row (up, down, across, or diagonally) wins!
If all 9 cells are filled and no one wins, the game is a Draw.
Click the Reset button to start a new game.
๐ธ Screenshots
(You can add screenshots of your game here later!)
๐ฎ Future Improvements
[ ] Add a score counter to track wins for Player X and Player O.
[ ] Implement a "Player vs Computer" mode.
[ ] Add sound effects for clicks and wins.
๐ค Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
Fork the Project
Create your Feature Branch (git checkout -b feature/AmazingFeature)
Commit your Changes (git commit -m 'Add some AmazingFeature')
Push to the Branch (git push origin feature/AmazingFeature)
Open a Pull Request
๐ License
Distributed under the MIT License. See LICENSE for more information.