import type { CardGameRules } from "../card-games.types.ts"; import type { PresidentGame, PresidentMove } from "./president.types.ts"; /** A game of President as text: its table, its seed and its moves, never a hand. * * @param game - The current native game; applying a move returns a new state. * @returns A game of President as text: its table, its seed and its moves, never a hand. * * @example * ```ts * import { CARD_GAME_TABLES, newGame } from "@johnmorrisdotca/toranpu"; * import { encodePresident } from "@johnmorrisdotca/toranpu/president"; * * const names = Array.from({ length: CARD_GAME_TABLES.president.defaultPlayers }, (_, seat) => `Seat ${seat + 1}`); * let game = newGame("president", { players: names, seed: 42 })!; * console.log(encodePresident(game)); * ``` */ export declare const encodePresident: (game: PresidentGame) => string; /** Text read back into the game of President it records, by playing every move again through the rules; null for anything they cannot play out. * * @param text - The notation, encoded state or saved text to read. * @returns Text read back into the game of President it records, by playing every move again through the rules; null for anything they cannot play out. * * @example * ```ts * import { CARD_GAME_TABLES, newGame } from "@johnmorrisdotca/toranpu"; * import { decodePresident, encodePresident } from "@johnmorrisdotca/toranpu/president"; * * const names = Array.from({ length: CARD_GAME_TABLES.president.defaultPlayers }, (_, seat) => `Seat ${seat + 1}`); * let game = newGame("president", { players: names, seed: 42 })!; * console.log(decodePresident(encodePresident(game))?.phase); * ``` */ export declare const decodePresident: (text: string | null) => PresidentGame | null; /** President as one `CardGameRules`: everything a table asks of the game. * * @example * ```ts * import { PRESIDENT_RULES } from "@johnmorrisdotca/toranpu/president"; * console.log(Object.keys(PRESIDENT_RULES)); * ``` */ export declare const PRESIDENT_RULES: CardGameRules;