Skip to main content

NativePokerState

Serialized no-limit Hold’em table state (camelCase JSON) passed to decideAction.

Shape

type CardInput = string[] | Uint8Array;

interface NativePokerState {
players: Array<{
name?: string;
holeCards: CardInput; // required per active player
stack?: number;
committedThisStreet?: number;
totalCommittedHand?: number;
folded?: boolean;
seat?: number;
}>;
communityCards: CardInput;
phase: string; // PreFlop, flop, turn, river, Showdown, …
pot?: number;
currentBet?: number;
buttonSeat?: number;
smallBlind?: number;
bigBlind?: number;
actingIndex?: number;
lastRaiseIncrement?: number;
streetOpeningIndex?: number;
actedThisStreet: boolean[]; // required — one flag per seat
}

Notes

  • holeCards and communityCards accept canonical card strings or packed Uint8Array (deck ids 0..51). See Packed card input.
  • phase is case-insensitive in native code (preflop, flop, turn, river, showdown, handcomplete).
  • Pair with NativeBotConfig and optional NativeOpponentModel.

Guide: decideAction.