Skip to the content

Korokoroコロコロ

Roll mixed dice or type notation, compare exact probabilities, keep a history and replay seeded rolls.

Korokoro describes something small rolling in Japanese. About the name

Contents

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

NameTypeDescription
facesreadonly number[]

Physical face values, in the order thrown.

keepKeep

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)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/korokoro 1.16.0.