Reference · Rolls and exact odds
faceChancesfunction
Every face of one die of a group with its chance, beside the fair die's. For a custom die of words this is its odds: the faces have no total to have odds of.
Import it
import { faceChances } from "@johnmorrisdotca/korokoro";
Definition
function faceChances(group: DiceGroup): FaceChance[]
Parameters
| Name | Type | Description |
|---|---|---|
group | DiceGroup | One kind of dice and its rules. |
Returns
FaceChance[]
Every face of one die of a group with its chance, beside the fair die's. For a custom die of words this is its odds: the faces have no total to have odds of.
Examples
import { faceChances } from "@johnmorrisdotca/korokoro";
import { normalizeSpec } from "@johnmorrisdotca/korokoro";
const spec = normalizeSpec({ count: 2, sides: 6 });
console.log(faceChances(spec)[0]);{
face: 1,
label: '1',
chance: 0.16666666666666666,
fair: 0.16666666666666666
}What it prints (run when this page was built)