startDiceWar関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A new game, or null for a table it is not played at: fewer than two or more than eight players, dice or sides out of range, a goal out of range.
インポート
import { startDiceWar } from "@johnmorrisdotca/korokoro";
定義
function startDiceWar(options: DiceWarOptions): DiceWarGame | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
options | DiceWarOptions | Options for this call; omitted fields keep their documented defaults. |
戻り値
DiceWarGame | null
A new game, or null for a table it is not played at: fewer than two or more than eight players, dice or sides out of range, a goal out of range.
例
import { startDiceWar } from "@johnmorrisdotca/korokoro";
console.log(startDiceWar({ players: ["One", "Two"], seed: "table" })?.phase);playing出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。