A fun and addictive dice game built with React. Roll the dice, hold the ones you want to keep, and try to get all ten dice showing the same number!
- Roll the Dice: Click the "Roll Dice" button to roll all 10 dice.
- Hold Dice: Click on individual dice to freeze them at their current value.
- Win Condition: Keep rolling and holding until all dice show the same number.
- New Game: Once you win, click "New Game" to start over.
- Interactive Dice: Click any die to hold or unhold it
- Confetti Celebration: Enjoy a confetti animation when you win!
- Keyboard Accessible: The roll button automatically focuses after winning
- Responsive Design: Works on different screen sizes
- Fast Gameplay: Quick rolls and instant feedback
- React 19: Modern React with hooks
- Vite: Fast build tool and development server
- nanoid: For generating unique IDs for dice
- react-confetti: Celebration effects
- react-use: Utility hooks (window size detection)
- ESLint: Code linting
- Node.js (version 16 or higher)
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd tenzies- Install dependencies:
npm installnpm run devOpen http://localhost:5173 in your browser to play the game.
npm run buildThe built files will be in the dist folder.
npm run previewnpm run linttenzies/
├── public/
├── src/
│ ├── components/
│ │ └── Die.jsx
│ ├── App.jsx
│ ├── index.css
│ └── index.jsx
├── package.json
├── vite.config.js
├── eslint.config.js
└── README.md
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
Enjoy playing Tenzies! 🎲