Tic Tac Toe Game (React JS)

This is a modern and interactive Tic Tac Toe game built using React.js and Vite. It allows two players to play alternately with symbols ‘X’ and ‘O on a 3×3 grid. The final year projects win, draw, and provide an option to restart instantly. With its responsive, glassy UI, glowing animations, and smooth transitions, it offers an enjoyable user experience.

  • Two-player gameplay: Players take turns to mark “X” or “O” in the grid.
  • Automatic winner detection: The app checks for winning combinations in real-time.
  • Draw detection: Displays a “Draw” message if all boxes are filled without a winner.
  • Restart button: Easily reset the game to play again.
  • Confetti animation: Celebratory effect when a player wins.
  • Stylish design: Transparent boxes, neon glow for X/O, and animated hover effects.
  • Fast performance: Built using Vite for quick load times and smooth updates.
  • The 3×3 grid is generated using React components.
  • On each click:
    • The box updates with the current player’s mark (“X” or “O”).
    • The turn switches to the next player.
  • The app checks for winning combinations after every move.
  • If all cells are filled without a winner → displays a draw message.
  • When a player wins:
    • Winner’s name is shown.
    • Confetti animation plays.
  • Players can click Restart to reset the board and start fresh.
  • React.js: for building the interactive UI.
  • Vite: for fast bundling and hot reloading.
  • CSS3: for styling, animations, and responsive layout.
  • JavaScript (ES6): for game logic and interactivity.
  • React-Confetti: for celebration animation on win.
  • Great for understanding React state management (useStateuseEffect).
  • Helps beginners practice conditional rendering and component communication.
  • Demonstrates how to handle game logic and UI updates together.
  • Can be extended with features like score tracking, AI opponent, or multiplayer mode.

Note: This project is for educational purposes only. Not for commercial sale.