GameOf型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A game of that kind, in progress.
インポート
import type { GameOf } from "@johnmorrisdotca/toranpu";
定義
type GameOf<K extends CardGameKind> = CardGamePlays[K]["game"];
例
import { newGame } from "@johnmorrisdotca/toranpu";
import type { GameOf } from "@johnmorrisdotca/toranpu";
const game = newGame("hearts", { players: ["Aki", "Ben", "Cy", "Dev"], seed: 42 })!;
const value: GameOf<"hearts"> = game;
console.log(value.phase);passing出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。