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

RollOptionstype

What roll and rollMany may be told beside the dice and the source.

Import it

import type { RollOptions } from "@johnmorrisdotca/korokoro";

Definition

type RollOptions = {
    at?: number;
    maxDice?: number;
};

Members

NameTypeDescription
at (optional)number | undefined

When the roll is made, in epoch milliseconds. Now, unless given.

maxDice (optional)number | undefined

The most dice the roll may have, from 10 (the default) to MAX_DICE_BY_CODE. Past ten, every kind has to be plain dice.

Examples

import type { RollOptions } from "@johnmorrisdotca/korokoro";
const value: RollOptions = { at: 0, maxDice: 20 };
console.log(value.maxDice);
20

What it prints (run when this page was built)

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