This is a simple, interactive Tic Tac Toe game developed using HTML, CSS, and JavaScript. Designed for two players, it features winner detection, tie handling, and the ability to reset or start a new game. With a responsive design, the game is playable on desktop and mobile devices.
- Two-player Mode: Players take turns marking their symbols (X or O) on the game board.
- Win Detection: Automatically checks for three matching symbols in a row, column, or diagonal.
- Tie Handling: Declares a tie if the board fills up without a winner.
- Reset and New Game: Restart the game at any time using the reset button or start fresh with the new game button.
- Responsive Design: Ensures smooth gameplay on both desktop and mobile devices.
- Dynamic Background: Changes background color to indicate the current player's turn.
- Clean Layout: Minimalistic design with a focus on usability and aesthetics.
- Works across different screen sizes, ensuring a consistent experience on phones, tablets, and computers.
- The game starts with Player O's turn.
- Players take turns clicking on boxes to place their markers (X or O).
- The game detects the winner when three symbols align horizontally, vertically, or diagonally.
- If all boxes are filled without a winner, the game announces a tie.
- Use the Reset or New Game button to restart.
index.html
: Defines the game structure, buttons, and messages.style.css
: Styles the game board, buttons, and layout for responsiveness.app.js
: Implements game logic, turn handling, and winner detection.
- Clone this repository:
git clone https://github.com/your-username/tic-tac-toe.git
- Navigate to the project directory:
cd tic-tac-toe
3.Open the index.html
file in your browser.
- HTML: Structure and layout of the game.
- CSS: Styling and responsive design.
- JavaScript: Game logic and interactivity.
- Add a single-player mode with an AI opponent.
- Include additional game themes and styles.
- Add animations for winner announcements and transitions.
Created by Shubham Rawat.