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

startDiceWarfunction

A new game, or null for a table it is not played at: fewer than two or more than eight players, dice or sides out of range, a goal out of range.

Import it

import { startDiceWar } from "@johnmorrisdotca/korokoro";

Definition

function startDiceWar(options: DiceWarOptions): DiceWarGame | null

Parameters

NameTypeDescription
optionsDiceWarOptions

Options for this call; omitted fields keep their documented defaults.

Returns

DiceWarGame | null

A new game, or null for a table it is not played at: fewer than two or more than eight players, dice or sides out of range, a goal out of range.

Examples

import { startDiceWar } from "@johnmorrisdotca/korokoro";
console.log(startDiceWar({ players: ["One", "Two"], seed: "table" })?.phase);
playing

What it prints (run when this page was built)

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