diceWarSpec関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The dice a game rolls, as a spec the rest of the package reads.
インポート
import { diceWarSpec } from "@johnmorrisdotca/korokoro";
定義
function diceWarSpec(game: Pick<DiceWarGame, "dice" | "sides">): RollSpec
引数
| 名前 | 型 | 説明 |
|---|---|---|
game | Pick<DiceWarGame, "dice" | "sides"> | The current Dice War state. |
戻り値
RollSpec
The dice a game rolls, as a spec the rest of the package reads.
例
import { diceWarSpec } from "@johnmorrisdotca/korokoro";
import { formatNotation, startDiceWar } from "@johnmorrisdotca/korokoro";
const game = startDiceWar({ players: ["One", "Two"], computers: [true, true], goal: "rounds", to: 1, seed: "table" })!;
console.log(formatNotation(diceWarSpec(game)));1d6出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。