/Tic-Tac-Toe-Game

Primary LanguageJavaScriptMIT LicenseMIT

Tic-Tac-Toe Game

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.

Features

  • 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.
  1. Clone the Repository:

    git clone https://github.com/yourusername/tic-tac-toe-game.git
  2. Navigate to the Project Directory:

    cd tic-tac-toe-game
  3. Open index.html in Your Browser: You can simply open the index.html file in your preferred web browser to start playing the game.

  4. 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".

  5. Start Playing: Click on the cells to make your move. The game will automatically detect a win or draw and display the result.

  6. Reset the Game: Click the "Reset Game" button to start a new match.

Technologies Used

  • 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.

Responsive Design

The game is fully responsive, ensuring that it looks and works well on devices of all sizes, from mobile phones to laptops.

Dark Mode

You can toggle between light and dark mode by clicking the moon/sun icon in the top right corner of the screen.

Winning Animation

When a player wins, a fun confetti animation plays across the screen to celebrate the victory.

Contributing

Contributions are welcome! If you have any suggestions or improvements, feel free to open an issue or submit a pull request.

Contact

Feel free to reach out if you have any questions or suggestions:

  • Name: Ansh Soni
  • LinkedIn: Link