DiceWarOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a game of Dice War is set up with. Everything but the players is optional.
インポート
import type { DiceWarOptions } from "@johnmorrisdotca/korokoro";
定義
type DiceWarOptions = {
players: readonly string[];
computers?: readonly boolean[];
dice?: number;
sides?: number;
goal?: DiceWarGoal;
to?: number;
seed?: string;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
players | readonly string[] | One name a seat. Two to eight. |
computers (省略可) | readonly boolean[] | undefined | One a seat: true where a computer rolls. A seat not given is a person's, whose dice are handed in. |
dice (省略可) | number | undefined | How many dice each player rolls, added up: 1 unless said, up to |
sides (省略可) | number | undefined | How many sides each die has, 2 to 1000: 6 unless said. |
goal (省略可) | DiceWarGoal | undefined |
|
to (省略可) | number | undefined | The score to play to, or the number of rounds: 5 unless said. |
seed (省略可) | string | undefined | The seed the computers' dice come from, any text: a fresh one unless said. |
例
import type { DiceWarOptions } from "@johnmorrisdotca/korokoro";
const value: DiceWarOptions = { players: ["One", "Two"], computers: [true, true], seed: "docs" };
console.log(value.players.length);2出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。