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

diceWarOverfunction

Whether a game is over.

Import it

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

Definition

function diceWarOver(game: DiceWarGame): boolean

Parameters

NameTypeDescription
gameDiceWarGame

The current Dice War state.

Returns

boolean

Whether a game is over.

Examples

import { diceWarOver } from "@johnmorrisdotca/korokoro";
import { startDiceWar } from "@johnmorrisdotca/korokoro";
const game = startDiceWar({ players: ["One", "Two"], computers: [true, true], goal: "rounds", to: 1, seed: "table" })!;
console.log(diceWarOver(game));
false

What it prints (run when this page was built)

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