本文へ移動

Korokoroコロコロ

ダイスを組み合わせて振り、ダイス表記を読み取り、正確な確率を調べます。履歴の保存やシードを指定した再現もできます。

「コロコロ」は、小さなものが転がる様子を表す言葉です。 名前について(英語)

目次

リファレンス · ロールと正確な確率

LOADED_PRESETS定数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

Three loaded dice to try, each an old trick with a long record.

インポート

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

定義

const LOADED_PRESETS: readonly LoadedPreset[] = [
    {
        id: "optimist",
        name: "The Optimist",
        notation: "1d6{6:3}",
        says: "A die weighted towards its six, which it shows three times in eight. It believes in you more than the odds do.",
    },
    {
        id: "flat",
        name: "The Six-Ace Flat",
        notation: "1d6{1:2,6:2}",
        says: "Shaved a little thin between the 1 and the 6, so those two faces land twice as often as the rest. The oldest job a file ever did.",
    },
    {
        id: "odd-couple",
        name: "The Odd Couple",
        notation: "2d6{2:0,4:0,6:0}",
        says: "Two dice with no even faces. Between them they have never made a seven, and they are not going to start now.",
    },
]

例

import { LOADED_PRESETS } from "@johnmorrisdotca/korokoro";
console.log(Object.keys(LOADED_PRESETS));
[ '0', '1', '2' ]

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/korokoro 1.16.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。