startHitotsu関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Deal a new seeded game for two to eight players at a supported match length; null for an unsupported length or player count.
インポート
import { startHitotsu } from "@johnmorrisdotca/hitotsu";
定義
function startHitotsu(size: number, players: readonly string[], seed?: number, options?: HitotsuOptions, computers?: readonly boolean[]): HitotsuGame | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
size | number | The match length: 1 for one hand, or 200 or 500 points. |
players | readonly string[] | The two to eight player names in seat order. |
seed (省略可) | number | The numeric seed that reproduces the same random sequence or deal. |
options (省略可) | HitotsuOptions | Native table, rules, sound or drawing settings; omitted fields retain their defaults. |
computers (省略可) | readonly boolean[] | undefined | Computer-controlled seats: flags for a game, seat indices for a shared table. |
戻り値
HitotsuGame | null
Deal a new seeded game for two to eight players at a supported match length; null for an unsupported length or player count.
例
import { HITOTSU_CLASSIC, startHitotsu } from "@johnmorrisdotca/hitotsu";
console.log(startHitotsu(1, ["Aki", "Ben"], 42, HITOTSU_CLASSIC)?.hands.map((hand) => hand.length));[ 7, 7 ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。