import type { BigTwoGame } from "./bigTwo/big-two.types.ts"; import type { CardGameKind } from "./card-games.constants.ts"; import type { CardGameRules } from "./card-games.types.ts"; import type { ClimbMove } from "./climbing/climbing.types.ts"; import type { CrazyEightsGame, CrazyEightsMove } from "./crazyEights/crazy-eights.types.ts"; import type { CribbageGame, CribbageMove } from "./cribbage/cribbage.types.ts"; import type { EuchreGame, EuchreMove } from "./euchre/euchre.types.ts"; import type { GinGame, GinMove } from "./ginRummy/gin-rummy.types.ts"; import type { GoFishGame, GoFishMove } from "./goFish/go-fish.types.ts"; import type { HeartsGame, HeartsMove } from "./hearts/hearts.types.ts"; import type { OhHellGame, OhHellMove } from "./ohHell/oh-hell.types.ts"; import type { PresidentGame, PresidentMove } from "./president/president.types.ts"; import type { SpadesGame, SpadesMove } from "./spades/spades.types.ts"; import type { StackUpGame, StackUpMove } from "./stackUp/stack-up.types.ts"; import type { WarGame, WarMove } from "./war/war.types.ts"; /** Each card game's game and move, so its rules can be named with their own types. * * @example * ```ts * import type { CardGamePlays } from "@johnmorrisdotca/toranpu"; * import { newGame } from "@johnmorrisdotca/toranpu"; * * const value: CardGamePlays["hearts"]["game"] = newGame("hearts", { players: ["Aki", "Ben", "Cy", "Dev"], seed: 42 })!; * console.log(value.phase); * ``` */ export type CardGamePlays = { hearts: { game: HeartsGame; move: HeartsMove; }; bigTwo: { game: BigTwoGame; move: ClimbMove; }; president: { game: PresidentGame; move: PresidentMove; }; goFish: { game: GoFishGame; move: GoFishMove; }; crazyEights: { game: CrazyEightsGame; move: CrazyEightsMove; }; spades: { game: SpadesGame; move: SpadesMove; }; ginRummy: { game: GinGame; move: GinMove; }; euchre: { game: EuchreGame; move: EuchreMove; }; cribbage: { game: CribbageGame; move: CribbageMove; }; ohHell: { game: OhHellGame; move: OhHellMove; }; war: { game: WarGame; move: WarMove; }; stackUp: { game: StackUpGame; move: StackUpMove; }; }; /** * EVERY CARD GAME'S RULES, by kind: what a table plays and what the * simulation plays out. A mapped type, so a new card game * does not compile until its rules are here. * * @example * ```ts * import { CARD_GAME_RULES } from "@johnmorrisdotca/toranpu"; * console.log(Object.keys(CARD_GAME_RULES)); * ``` */ export declare const CARD_GAME_RULES: { [K in CardGameKind]: CardGameRules; };