import { GameState } from "./game-state"; import { Player } from "./player"; /** * Public player with potentially masked cards * In public views, hand can have null elements to preserve positional context * Examples: * - ["As", "Kd"] - both cards visible * - [null, "Kd"] - only right card visible * - ["As", null] - only left card visible * - null - all cards hidden (mucked or pre-showdown) */ export interface PublicPlayer extends Omit { readonly hand: ReadonlyArray | null; } /** * Public view of game state with hidden information masked * Used to send to clients to prevent cheating */ export interface PublicState extends Omit { readonly deck: readonly number[]; readonly players: ReadonlyArray; readonly viewingPlayerId: string | null; readonly version: number; }