Reference · Rolls and exact odds
RollSettype
The same roll thrown several times in one go, with what the set comes to.
Import it
import type { RollSet } from "@johnmorrisdotca/korokoro";
Definition
type RollSet = {
rolls: Roll[];
sum: number;
highest: number;
lowest: number;
};
Members
| Name | Type | Description |
|---|---|---|
rolls | Roll[] | Every roll, in the order thrown. |
sum | number | The totals added up. |
highest | number | The highest total. |
lowest | number | The lowest total. |
Examples
import type { RollSet } from "@johnmorrisdotca/korokoro";
import { DEFAULT_SPEC, rollMany, seededSource } from "@johnmorrisdotca/korokoro";
const value: RollSet = rollMany(DEFAULT_SPEC, 3, seededSource("docs"), 0);
console.log(value.rolls.length);3What it prints (run when this page was built)