@idealic/poker-engine
Version:
Professional poker game engine and hand evaluator with built-in iterator utilities
22 lines • 1.32 kB
TypeScript
import { Player, type Action, type Street, type Game } from '../types';
import type { PlayerStreetStats } from './types';
export declare const emptyStat: Omit<PlayerStreetStats, 'gameId' | 'hand' | 'tableId' | 'playerId' | 'timestamp' | 'street'>;
/**
* Helper function to get or create a stat entry for a player and street
* Also updates opportunity-based statistics
*/
export declare function getOrCreatePlayerStreetStats(table: Game, playerId: string | number, street: Street): PlayerStreetStats;
export declare function getTablePlayerById(table: Game, playerId: string | number): Player;
export declare function getTablePlayerId(table: Game, playerId: string | number): string;
export declare function getTablePlayerIndex(table: Game, playerId: string | number): number;
export declare function recordStatsBefore(table: Game, playerId: string | number): void;
/**
* Records statistics after an action is applied to the table
* This handles all action-based statistics (bets, raises, etc.)
*/
export declare function recordStatsAfter(table: Game, action: Action): void;
/**
* Extracts player statistics for a specific player and street
*/
export declare function getPlayerStreetStats(table: Game, playerId: string | number, street: Street): PlayerStreetStats | undefined;
//# sourceMappingURL=stats.d.ts.map