startParty関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The deal: each player the next hand from the bag in turn, player one first, and every table empty. A seat is a name, or a name and whether a computer plays it; a computer is named "Computer 1", "Computer 2"… in seat order.
インポート
import { startParty } from "@johnmorrisdotca/kumimoji";
定義
function startParty(settings: PartySettings, bag: string, seats: readonly (string | PartySeat)[]): PartyGame
引数
| 名前 | 型 | 説明 |
|---|---|---|
settings | PartySettings | The native party setup settings. |
bag | string | The original bag in draw order. |
seats | readonly (string | PartySeat)[] | Local player names and optional computer flags. |
戻り値
PartyGame
The deal: each player the next hand from the bag in turn, player one first, and every table empty. A seat is a name, or a name and whether a computer plays it; a computer is named "Computer 1", "Computer 2"… in seat order.
例
import { startParty } from "@johnmorrisdotca/kumimoji";
const settings = {size:3,level:"hard",seed:44,gameLength:"short",language:"english",doubleSet:false,diagonals:false,hints:false} as const;
const bag = "catdogsun";
console.log(startParty(settings,bag,["Seat 1","Seat 2"]).players.length);2出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。