A modern implementation of the classic Tenzies dice game built with React and TypeScript (TSX). The goal of the game is simple: roll the dice until all of them show the same number, while strategically freezing dice between rolls.
This project focuses on clean component design, state management, and strong typing using TypeScript.
- 🎯 Classic Tenzies game rules
- 🔁 Roll dice until all values match
- 📌 Freeze/unfreeze individual dice
- 🧠 Win detection logic
- ⏱️ Optional roll counter / timer (if implemented)
- ⚛️ Built with React functional components
- 🧾 Fully written in TypeScript (TSX)
- React
- TypeScript
- Vite (for fast development)
- CSS / Tailwind CSS (depending on your setup)
src/
│── App.tsx # Main application logic
│── index.tsx # Entry point
│── components/ # Reusable UI components
│ ├── Die.tsx
│ ├── DiceGrid.tsx
│ └── ...
│── index.css # Global styles
- Click Roll to roll all dice.
- Click on a die to freeze its value.
- Continue rolling until all dice show the same number.
- When all dice are frozen and identical, you win 🎉
git clone https://github.com/2iaad/tenzies-game.git
cd tenzies-gamenpm installnpm run devOpen your browser at:
http://localhost:5173
- React state management with hooks
- Immutable updates to arrays and objects
- TypeScript interfaces and props typing
- Component-based architecture
- Game logic and condition checks
This project is for learning and educational purposes.
Built by Ziyad Derfoufi as part of learning React and TypeScript.
If you have suggestions or feedback, feel free to open an issue or pull request.
