Welcome to the Tic-Tac-Toe Game! This is a simple yet fun implementation of the classic Tic-Tac-Toe game using HTML, CSS, and JavaScript. The game includes features like player customization, dark mode, winning animations, and full responsiveness for both mobile devices and laptops.
- Player Customization: Enter player names and choose whether Player 1 plays as "X" or "O".
- Responsive Design: The game is designed to work seamlessly on both mobile devices and laptops.
- Dark Mode: Toggle between light and dark modes with a simple button click.
- Winning Animation: Enjoy a confetti animation when a player wins.
- Reset Functionality: Reset the game at any time to start a new match.
-
Clone the Repository:
git clone https://github.com/yourusername/tic-tac-toe-game.git
-
Navigate to the Project Directory:
cd tic-tac-toe-game
-
Open
index.html
in Your Browser: You can simply open theindex.html
file in your preferred web browser to start playing the game. -
Enter Player Names: Enter the names of Player 1 and Player 2 in the input fields provided. Choose whether Player 1 will play as "X" or "O".
-
Start Playing: Click on the cells to make your move. The game will automatically detect a win or draw and display the result.
-
Reset the Game: Click the "Reset Game" button to start a new match.
- HTML: Markup for creating the structure of the game.
- CSS: Styling for the game, including responsive design and animations.
- JavaScript: Logic for the game, including player interactions, win detection, and animations.
The game is fully responsive, ensuring that it looks and works well on devices of all sizes, from mobile phones to laptops.
You can toggle between light and dark mode by clicking the moon/sun icon in the top right corner of the screen.
When a player wins, a fun confetti animation plays across the screen to celebrate the victory.
Contributions are welcome! If you have any suggestions or improvements, feel free to open an issue or submit a pull request.
Feel free to reach out if you have any questions or suggestions:
- Name: Ansh Soni
- LinkedIn: Link