startStackUp関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A new game of Stack Up for two to six players with a stock pile of this size, dealt from the seed, or null for a table it is not offered for.
インポート
import { startStackUp } from "@johnmorrisdotca/toranpu/stack-up";
定義
function startStackUp(size: number, players: readonly string[], _language?: unknown, dealt?: number, computers?: readonly boolean[]): StackUpGame | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
size | number | The cards in each player's stock pile: 10, 15 or 20. |
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. |
戻り値
StackUpGame | null
A new game of Stack Up, or null.
例
import { startStackUp } from "@johnmorrisdotca/toranpu/stack-up";
console.log(startStackUp(15, ["Aki", "Ben"], undefined, 42)?.hands[0]?.length);5出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。