UNPKG

@idealic/poker-engine

Version:

Professional poker game engine and hand evaluator with built-in iterator utilities

44 lines 1.41 kB
/** * @instructions * Keep dealer actions pure and functional. * Do not introduce state management. * Follow existing action format. */ import type { Action, Game } from '../types'; /** * Gets the next N cards from the deck, using the table's seed and usedCards */ export declare function getNextCards(game: Game, count: number): string[]; /** * Deals hole cards to the next player who needs them */ export declare function dealHoleCardsFromDeck(game: Game): Action | null; /** * Deals the next street of community cards */ export declare function dealStreet(game: Game): Action; /** * Shows next player's cards at showdown */ export declare function showCards(game: Game): Action | null; /** * Determines which dealer action to take based on table state. * Assumes it's dealer's turn (getCurrentPlayerIndex returned -1). * Returns a single action without applying it to the game. * * @instructions * This function ONLY checks: * 1. Missing hole cards - deal to next player * 2. Single player remaining - no more dealing needed * 3. All-in situations - deal all remaining streets * 4. Normal betting - deal next street if all acted * 5. Showdown - show cards * * It does NOT: * - Check bet amounts (only hasActed flags) * - Apply actions to table * - Handle side pots * - Reset flags */ export declare function deal(game: Game): Action | null; //# sourceMappingURL=dealer.d.ts.map