DiceWarThrow型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One throw of the table: everybody who had to roll, in seat order, the war it was in (0 for the round's first throw), the seats that tied for highest, and who took the stake: null where the throw was a tie and the war goes on, or the round was called off.
インポート
import type { DiceWarThrow } from "@johnmorrisdotca/korokoro";
定義
type DiceWarThrow = {
round: number;
war: number;
rolls: DiceWarRoll[];
tied: number[];
winner: number | null;
stake: number;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
round | number | |
war | number | |
rolls | DiceWarRoll[] | |
tied | number[] | |
winner | number | null | |
stake | number |
例
import type { DiceWarThrow } from "@johnmorrisdotca/korokoro";
import { startDiceWar, playDiceWar } from "@johnmorrisdotca/korokoro";
const value: DiceWarThrow = playDiceWar(startDiceWar({ players: ["One", "Two"], computers: [true, true], seed: "docs" })!, {})!.throws[0]!;
console.log(value.round);1出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。