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

diceWarPeopleToRollfunction

The seats whose dice a move must hand in now: the people among those who roll. A table of computers needs none.

Import it

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

Definition

function diceWarPeopleToRoll(game: DiceWarGame): number[]

Parameters

NameTypeDescription
gameDiceWarGame

The current Dice War state.

Returns

number[]

The seats whose dice a move must hand in now: the people among those who roll. A table of computers needs none.

Examples

import { diceWarPeopleToRoll } from "@johnmorrisdotca/korokoro";
import { startDiceWar } from "@johnmorrisdotca/korokoro";
console.log(diceWarPeopleToRoll(startDiceWar({ players: ["One", "Two"], seed: "table" })!));
[ 0, 1 ]

What it prints (run when this page was built)

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