A simple implementation of the classic Tic Tac Toe game using HTML, CSS, and JavaScript.
- Two Players: Play against a friend on the same device.
- Responsive Design: Enjoy the game on various screen sizes.
- Winning Logic: The game automatically checks for a winning combination after each move.
- Game Reset: Start a new game with a click of a button.
- HTML: For structuring the game board and user interface.
- CSS: For styling the game and making it visually appealing.
- JavaScript: For implementing game logic, handling player moves, and checking for win/draw conditions.
- Open the
index.html
file in your web browser. - The game starts with Player 1 (X) making the first move.
- Players take turns marking an empty cell by clicking on it.
- The game announces the winner when a player has three marks in a row horizontally, vertically, or diagonally.
- If the board is filled and there is no winner, the game declares a draw.
- Click the "Restart" button to start a new game.
To further develop or customize the game, you can modify the JavaScript code in the script.js
file to add new features, improve the UI, or change the game's behavior.