startBigTwo関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A new game of Big Two for these players (one name a seat) at this size, dealt from the seed dealt, or null for a table Big Two is not offered for. computers says, one a seat, which seats a computer plays; the third argument is unused.
インポート
import { startBigTwo } from "@johnmorrisdotca/toranpu/big-two";
定義
function startBigTwo(size: number, players: readonly string[], _language?: unknown, dealt?: number, computers?: readonly boolean[]): BigTwoGame | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
size | number | The game’s length or size, as defined by its table specification. |
players | readonly string[] | The player names in seat order. |
_language (省略可) | unknown | An unused legacy language argument retained for compatibility. |
dealt (省略可) | number | undefined | The numeric seed used to deal the game. |
computers (省略可) | readonly boolean[] | undefined | Flags by seat: true where a computer controls that seat. |
戻り値
BigTwoGame | null
A new game of Big Two for these players (one name a seat) at this size, dealt from the seed dealt, or null for a table Big Two is not offered for. computers says, one a seat, which seats a computer plays; the third argument is unused.
例
import { CARD_GAME_TABLES } from "@johnmorrisdotca/toranpu";
import { startBigTwo } from "@johnmorrisdotca/toranpu/big-two";
const names = Array.from({ length: CARD_GAME_TABLES.bigTwo.defaultPlayers }, (_, seat) => `Seat ${seat + 1}`);
console.log(startBigTwo(CARD_GAME_TABLES.bigTwo.defaultSize, names, undefined, 42)?.phase);playing出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。