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

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

NameTypeDescription
groupDiceGroup

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)

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