GameOftype
A game of that kind, in progress.
Import it
import type { GameOf } from "@johnmorrisdotca/toranpu";
Definition
type GameOf<K extends CardGameKind> = CardGamePlays[K]["game"];
Examples
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);passingWhat it prints (run when this page was built)