Reference · Rolls and exact odds
keptFacesfunction
Which faces count towards the total when one is kept. Ties keep the first die that shows the kept value.
Import it
import { keptFaces } from "@johnmorrisdotca/korokoro";
Definition
function keptFaces(faces: readonly number[], keep: Keep): boolean[]
Parameters
| Name | Type | Description |
|---|---|---|
faces | readonly number[] | Physical face values, in the order thrown. |
keep | Keep | Whether all dice, the highest or the lowest count. |
Returns
boolean[]
Which faces count towards the total when one is kept. Ties keep the first die that shows the kept value.
Examples
import { keptFaces } from "@johnmorrisdotca/korokoro";
console.log(keptFaces([1, 4, 6], "highest"));[ false, false, true ]What it prints (run when this page was built)