Tic Tac Toe is a simple and interactive game built using HTML, CSS, and JavaScript. This project demonstrates a classic gameplay experience where a single player competes against a basic AI opponent, with dynamic turn indicators and win/draw detection.
- Player vs. AI Mode: Challenge yourself against a responsive AI opponent with strategic logic.
- Interactive 3x3 Grid: A clickable grid for gameplay.
- Winner/Draw Detection: Highlights the winning line or indicates a draw.
- Restart Button: Resets the game for a fresh start.
- Responsive Design: Optimized for desktop and mobile devices.
- About Modal: Provides additional information about the game.
- Frontend: HTML5, CSS3, JavaScript.
- Libraries: Font Awesome for icons.
Follow these steps to run the project locally:
- Clone the Repository:
git clone https://github.com/rahul-prasad04/Tic-Tac-Toe-Game.git
- Navigate to the Project Directory:
cd Tic-Tac-Toe-Game
- Open the
index.html
File: Double-clickindex.html
or open it in any modern browser.
- Click on any box in the grid to place your mark (X).
- The AI (O) will take its turn automatically after yours.
- The first to align three marks in a row, column, or diagonal wins.
- If all boxes are filled without a winner, the game ends in a draw.
- Click the "Play Again" button to reset the game.
index.html
: Contains the layout and structure of the game.style.css
: Provides styling for the game, including responsiveness and animations.script.js
: Implements game logic, turn handling, and AI behavior.
This project is licensed under the MIT License. See the LICENSE file for details.