import type { CardGameRules } from "../card-games.types.ts"; import type { StackUpGame, StackUpMove } from "./stack-up.types.ts"; /** A game of Stack Up 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 Stack Up as text. * * @example * ```ts * import { encodeStackUp, startStackUp } from "@johnmorrisdotca/toranpu/stack-up"; * console.log(encodeStackUp(startStackUp(15, ["Aki", "Ben"], undefined, 42)!).length > 0); * ``` */ export declare const encodeStackUp: (game: StackUpGame) => string; /** Text read back into the game of Stack Up 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 The game, or null. * * @example * ```ts * import { decodeStackUp, encodeStackUp, startStackUp } from "@johnmorrisdotca/toranpu/stack-up"; * console.log(decodeStackUp(encodeStackUp(startStackUp(15, ["Aki", "Ben"], undefined, 42)!))?.phase); * ``` */ export declare const decodeStackUp: (text: string | null) => StackUpGame | null; /** Stack Up as one `CardGameRules`: everything a table asks of the game. * * @example * ```ts * import { STACK_UP_RULES } from "@johnmorrisdotca/toranpu/stack-up"; * console.log(Object.keys(STACK_UP_RULES)); * ``` */ export declare const STACK_UP_RULES: CardGameRules;