Reference · Rules, maps and records
throwDicefunction
count dice, highest first, and the state after them.
Import it
import { throwDice } from "@johnmorrisdotca/tenka";
Definition
function throwDice(state: number, count: number): { value: number[]; state: number; }
Parameters
| Name | Type | Description |
|---|---|---|
state | number | The seeded random generator state before the draw. |
count | number | The player or item count requested. |
Returns
{ value: number[]; state: number; }
count dice, highest first, and the state after them.
Examples
import { throwDice } from "@johnmorrisdotca/tenka";
console.log(throwDice(42,3));{ value: [ 6, 4, 3 ], state: 1199730185 }What it prints (run when this page was built)