Reference · Rolls and exact odds
groupRangefunction
The least and the most one kind of dice can total, its own rules applied.
Import it
import { groupRange } from "@johnmorrisdotca/korokoro";
Definition
function groupRange(group: DiceGroup): { min: number; max: number; }
Parameters
| Name | Type | Description |
|---|---|---|
group | DiceGroup | One kind of dice and its rules. |
Returns
{ min: number; max: number; }
The least and the most one kind of dice can total, its own rules applied.
Examples
import { groupRange } from "@johnmorrisdotca/korokoro";
import { normalizeSpec } from "@johnmorrisdotca/korokoro";
const spec = normalizeSpec({ count: 2, sides: 6 });
console.log(groupRange(spec));{ min: 2, max: 12 }What it prints (run when this page was built)