Skip to content

A fun and interactive dice game built with React and Vite. The goal is to get all ten dice to show the same number in the fewest rolls possible.

Notifications You must be signed in to change notification settings

VitorPio7/TenzieGame

Repository files navigation

Tenzie Game 🎲

A fun and interactive dice game built with React and Vite. The goal is to get all ten dice to show the same number in the fewest rolls possible.

About The Project

This project is a web-based implementation of the Tenzies dice game. It was developed as a hands-on project to practice and solidify core React concepts, including state management with useState and useEffect, conditional rendering, component lifecycle, and handling user events. It also incorporates fun libraries like react-confetti for a rewarding user experience.


🎮 Game Rules

  1. The game starts with ten random dice.
  2. Click the "Roll" button to roll the dice.
  3. Click on any die to "freeze" it at its current value. Frozen dice will not change on the next roll.
  4. Keep rolling and freezing dice until all ten show the same number.
  5. Once you win, a confetti animation will celebrate your victory! Try to win in as few rolls as you can.

✨ Features

  • Interactive Dice Rolling: Roll the dice with a single button click.
  • Hold/Freeze Dice: Click on a die to hold its value for the next round.
  • Win State Detection: The game automatically detects when you've won.
  • Roll Counter: Tracks the number of rolls you've taken to win.
  • Celebratory Confetti Effect: A fun animation using react-confetti appears when you win.
  • Clean & Modern UI: A simple and intuitive interface for a pleasant gaming experience.

🛠️ Built With

This project was built using modern web technologies:


🚀 Getting Started

To get a local copy up and running, follow these simple steps.

Prerequisites

Make sure you have Node.js and npm installed on your machine.

  • npm
    npm install npm@latest -g

Installation

  1. Clone the repository:
    git clone [https://github.com/VitorPio7/TenzieGame.git](https://github.com/VitorPio7/TenzieGame.git)
  2. Navigate to the project directory:
    cd TenzieGame
  3. Install the NPM packages:
    npm install

Running the App

To run the app in development mode, use the following command. This will open the app on http://localhost:5173 (or the next available port).

npm run dev

📄 License

Distributed under the MIT License. See LICENSE for more information.


Contact

Vitor Pio - [GitHub Profile](https://github.com/VitorPio7

tenzieGame

About

A fun and interactive dice game built with React and Vite. The goal is to get all ten dice to show the same number in the fewest rolls possible.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published