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

Comparetype

A number a die is compared with: at a face (=), at or below it (<=), at or above it (>=), or anything but it (<>). Notation's <3 is kept as <=2, and >7 as >=8.

Import it

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

Definition

type Compare = {
    op: "=" | "<=" | ">=" | "<>";
    n: number;
};

Members

NameTypeDescription
op"=" | "<=" | ">=" | "<>"
nnumber

Examples

import type { Compare } from "@johnmorrisdotca/korokoro";
const value: Compare = { op: ">=", n: 5 };
console.log(value.n);
5

What it prints (run when this page was built)

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