pokie
Version:
A server-side video slot game logic framework for JavaScript and TypeScript.
46 lines (45 loc) • 1.78 kB
TypeScript
import { AsyncSimulationHandling, GameSessionHandling, SimulationConfigRepresenting } from "pokie";
export declare class Simulation implements AsyncSimulationHandling {
private readonly session;
private readonly numberOfRounds;
private readonly changeBetStrategy;
private readonly playStrategy;
private totalBetAmount;
private totalPayoutAmount;
private numberOfWiningRounds;
private readonly rtpPerRound;
private readonly allPayouts;
private readonly nonZeroPayouts;
private readonly betsPerRound;
private currentRoundNumber;
private beforePlayCallback?;
private afterPlayCallback?;
private onFinishedCallback?;
constructor(session: GameSessionHandling, config: SimulationConfigRepresenting);
run(): void;
runAsync(chunkSize?: number, delayBetweenChunks?: number): Promise<void>;
getLastRtp(): number;
getAverageRtp(): number;
getHitFrequency(): number;
getPayoutsStandardDeviation(includeZeroPayouts?: boolean): number;
getTotalBetAmount(): number;
getTotalPayoutAmount(): number;
getCurrentRoundNumber(): number;
getNumberOfWinningRounds(): number;
getTotalNumberOfRounds(): number;
setBeforePlayCallback(callback: () => void): void;
removeBeforePlayCallback(): void;
setAfterPlayCallback(callback: () => void): void;
removeAfterPlayCallback(): void;
setOnFinishedCallback(callback: () => void): void;
removeOnFinishedCallback(): void;
getAllBets(): number[];
getPayouts(includeZeroPayouts?: boolean): number[];
getAllRtpValues(): number[];
getAveragePayout(includeZeroPayouts?: boolean): number;
getAverageBet(): number;
private onFinished;
private canPlayNextGame;
private setBetBeforePlay;
private doPlay;
}