CribbagePhase型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Both players laying two cards to the crib, the pegging, or the game over.
インポート
import type { CribbagePhase } from "@johnmorrisdotca/toranpu/cribbage";
定義
type CribbagePhase = "crib" | "pegging" | "over";
例
import { CARD_GAME_TABLES, newGame } from "@johnmorrisdotca/toranpu";
import type { CribbagePhase } from "@johnmorrisdotca/toranpu/cribbage";
const names = Array.from({ length: CARD_GAME_TABLES.cribbage.defaultPlayers }, (_, seat) => `Seat ${seat + 1}`);
const game = newGame("cribbage", { players: names, seed: 42 })!;
const value: CribbagePhase = game.phase;
console.log(value);crib出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。