RollSet型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The same roll thrown several times in one go, with what the set comes to.
インポート
import type { RollSet } from "@johnmorrisdotca/korokoro";
定義
type RollSet = {
rolls: Roll[];
sum: number;
highest: number;
lowest: number;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
rolls | Roll[] | Every roll, in the order thrown. |
sum | number | The totals added up. |
highest | number | The highest total. |
lowest | number | The lowest total. |
例
import type { RollSet } from "@johnmorrisdotca/korokoro";
import { DEFAULT_SPEC, rollMany, seededSource } from "@johnmorrisdotca/korokoro";
const value: RollSet = rollMany(DEFAULT_SPEC, 3, seededSource("docs"), 0);
console.log(value.rolls.length);3出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。