Tenzies Dice Game is a simple and fun dice-rolling game built with React. The goal of the game is to roll the dice until all of them show the same value. Players can "hold" dice to keep their values between rolls.
The purpose of this program is to provide an interactive and engaging game where players can test their luck and strategy. It is a great example of a React-based project that demonstrates state management, component-based architecture, and accessibility features.
- Roll dice until all dice show the same value.
- Click on individual dice to "hold" their values between rolls.
- Confetti animation when the game is won.
- Fully accessible with screen reader support.
Make sure you have the following installed on your system:
- Clone this repository to your local machine:
git clone https://github.com/jacutlip/tenzies-dice-game.git
- Navigate to the project directory:
cd tenzies-dice-game
- Install the dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to the URL provided by the development server (usually
http://localhost:5173
).
App.jsx
: The main component that manages the game logic and renders the UI.Die.jsx
: A reusable component that represents an individual die.index.jsx
: The entry point of the application.index.css
: The styles for the application.vite.config.js
: Configuration for the Vite build tool.
This project uses the following dependencies:
react
andreact-dom
: For building the user interface.nanoid
: For generating unique IDs for the dice.react-confetti
: For the confetti animation when the game is won.
This project is licensed under the MIT License. Feel free to use, modify, and distribute it as you like.
This project was inspired by the classic Tenzies dice game. Special thanks to the React community for their excellent resources and tools.