import type { CardGameRules } from "../card-games.types.ts"; import type { GoFishGame, GoFishMove } from "./go-fish.types.ts"; /** A game of Go Fish 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 Go Fish as text: its table, its seed and its moves, never a hand. * * @example * ```ts * import { CARD_GAME_TABLES, newGame } from "@johnmorrisdotca/toranpu"; * import { encodeGoFish } from "@johnmorrisdotca/toranpu/go-fish"; * * const names = Array.from({ length: CARD_GAME_TABLES.goFish.defaultPlayers }, (_, seat) => `Seat ${seat + 1}`); * let game = newGame("goFish", { players: names, seed: 42 })!; * console.log(encodeGoFish(game)); * ``` */ export declare const encodeGoFish: (game: GoFishGame) => string; /** Text read back into the game of Go Fish 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 Go Fish 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 { decodeGoFish, encodeGoFish } from "@johnmorrisdotca/toranpu/go-fish"; * * const names = Array.from({ length: CARD_GAME_TABLES.goFish.defaultPlayers }, (_, seat) => `Seat ${seat + 1}`); * let game = newGame("goFish", { players: names, seed: 42 })!; * console.log(decodeGoFish(encodeGoFish(game))?.phase); * ``` */ export declare const decodeGoFish: (text: string | null) => GoFishGame | null; /** Go Fish as one `CardGameRules`: everything a table asks of the game. * * @example * ```ts * import { GO_FISH_RULES } from "@johnmorrisdotca/toranpu/go-fish"; * console.log(Object.keys(GO_FISH_RULES)); * ``` */ export declare const GO_FISH_RULES: CardGameRules;