# Roll Dices

> Practice generating random integer values within different ranges using `Math.random()` by building a dice roller app and three random number generators.

- Difficulty: beginner
- Tags: useState, Math.random
- Estimated time: 30 minutes
- Tests: 8
- Requires subscription: no

## Overview

Practice generating random integer values within different ranges using `Math.random()` by building a dice roller app and three random number generators.


## Requirements

- Form:
  - The input defaults to `3` and only accepts values between `1` and `6`.
  - The **Roll** button (`data-testid="roll"`) submits the form.
- On submit, roll as many dice as the input value:
  - Render one `Dice` component per dice.
  - Each dice shows a random value between `1` and `6`.
- Add three random number generators, each with a **Roll** button and a result display:
  - Between `-10` and `10`, both included.
  - Between `7` and `14`, both **not** included.
  - Between `0` and `255`, both included.


## Notes

- `Dice.tsx` is provided and read-only.
- Respect the `data-testid` values expected by the tests.


## Tests

1.  default input value 3
2.  does not roll more than 6 dices
3.  does not roll less than 1 dice
4.  when click roll, number dices equals input value
5.  maps random values to dice faces
6.  first random is between -10 and 10 (both included)
7.  second random is between 8 and 13 (both not included)
8.  third random is between 0 and 255 (both included)

