@betorigami/game-calculations 0.0.0-sha-aa457a3-20251208235225 → 0.0.0-sha-b164d9d-20260126031858

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1808 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ import Big$1 from 'big.js';
4
+ import { Big as Big$1, Big as Big$2 } from 'big.js';
5
+
6
+ export type Proof = {
7
+ proofHash: string;
8
+ proofString: string;
9
+ };
10
+ export type SingleRandomValue = {
11
+ value: number;
12
+ values: number[];
13
+ count: 1;
14
+ min: number;
15
+ max: number;
16
+ } & Proof;
17
+ export type MultipleRandomValues = {
18
+ values: number[];
19
+ count: number;
20
+ min: number;
21
+ max: number;
22
+ } & Proof;
23
+ export interface RandomNumberGenerator {
24
+ getRandomInt({ min, max }: {
25
+ min: number;
26
+ max: number;
27
+ }): SingleRandomValue;
28
+ getUniqueRandomInts({ min, max, count }: {
29
+ min: number;
30
+ max: number;
31
+ count: number;
32
+ }): MultipleRandomValues;
33
+ getRandomIntsWithReplacement({ min, max, count }: {
34
+ min: number;
35
+ max: number;
36
+ count: number;
37
+ }): MultipleRandomValues;
38
+ }
39
+ export declare enum OrigamiGame {
40
+ DICE = "DICE",
41
+ MINES = "MINES",
42
+ KENO = "KENO",
43
+ LIMBO = "LIMBO",
44
+ ADVANCED_DICE = "ADVANCED_DICE",
45
+ BACCARAT = "BACCARAT",
46
+ DIAMONDS = "DIAMONDS",
47
+ PLINKO = "PLINKO",
48
+ ROULETTE = "ROULETTE",
49
+ WHEEL = "WHEEL",
50
+ BLACKJACK = "BLACKJACK"
51
+ }
52
+ export type EmptyGameOutput = {};
53
+ export interface GetGameResultRequest<TGameInputs> {
54
+ generator: RandomNumberGenerator;
55
+ edge: number;
56
+ gameInputs: TGameInputs;
57
+ }
58
+ export interface GameResult<TGameOutputs = EmptyGameOutput> {
59
+ isFinished: boolean;
60
+ payoutMultiplier: Big$1;
61
+ outputs: TGameOutputs & {
62
+ result: number[];
63
+ };
64
+ randomValues: SingleRandomValue | MultipleRandomValues;
65
+ }
66
+ export declare abstract class Game<TGameInputs, TGameOutputs = EmptyGameOutput> {
67
+ readonly gameId: OrigamiGame;
68
+ protected constructor(gameId: OrigamiGame);
69
+ getGameResult(request: GetGameResultRequest<TGameInputs>): GameResult<TGameOutputs>;
70
+ protected abstract determineGameResult(request: GetGameResultRequest<TGameInputs>): GameResult<TGameOutputs>;
71
+ }
72
+ export type Bounds = {
73
+ lower: number;
74
+ upper: number;
75
+ };
76
+ export declare const RANDOM_MIN_VALUE = 0;
77
+ export declare const RANDOM_MAX_VALUE = 10000;
78
+ export declare const EFFECTIVE_RANGE = 10001;
79
+ export declare const MIN_WIN_CHANCE = 0.01;
80
+ export declare const MAX_WIN_CHANCE = 98;
81
+ export declare enum RollType {
82
+ ROLL_BETWEEN = "ROLL_BETWEEN",
83
+ ROLL_OUTSIDE = "ROLL_OUTSIDE",
84
+ ROLL_BETWEEN_TWO = "ROLL_BETWEEN_TWO"
85
+ }
86
+ export type RollBetween = {
87
+ mode: RollType.ROLL_BETWEEN;
88
+ bounds: Bounds;
89
+ };
90
+ export type RollOutside = {
91
+ mode: RollType.ROLL_OUTSIDE;
92
+ bounds: Bounds;
93
+ };
94
+ export type RollBetweenTwo = {
95
+ mode: RollType.ROLL_BETWEEN_TWO;
96
+ firstBounds: Bounds;
97
+ secondBounds: Bounds;
98
+ };
99
+ export type AdvancedDiceInputs = RollBetween | RollOutside | RollBetweenTwo;
100
+ export declare const validateAdvancedDiceInputs: (gameInputs: AdvancedDiceInputs) => void;
101
+ export declare class AdvancedDice extends Game<AdvancedDiceInputs> {
102
+ constructor();
103
+ protected determineGameResult({ generator, edge, gameInputs }: GetGameResultRequest<AdvancedDiceInputs>): GameResult;
104
+ }
105
+ export interface Bet {
106
+ amount: Big$1;
107
+ type: BaccaratBetType;
108
+ }
109
+ export interface BaccaratGameInputs {
110
+ bets: Bet[];
111
+ }
112
+ export declare const VALID_SUITS: readonly [
113
+ "Clubs",
114
+ "Diamonds",
115
+ "Hearts",
116
+ "Spades"
117
+ ];
118
+ export declare const VALID_RANKS: readonly [
119
+ "Ace",
120
+ "2",
121
+ "3",
122
+ "4",
123
+ "5",
124
+ "6",
125
+ "7",
126
+ "8",
127
+ "9",
128
+ "10",
129
+ "Jack",
130
+ "Queen",
131
+ "King"
132
+ ];
133
+ export type Suit = (typeof VALID_SUITS)[number];
134
+ export type Rank = (typeof VALID_RANKS)[number];
135
+ export interface Card {
136
+ suit: Suit;
137
+ rank: Rank;
138
+ }
139
+ export declare enum BaccaratOutcome {
140
+ PLAYER_WIN = "PLAYER_WIN",
141
+ TIE = "TIE",
142
+ BANKER_WIN = "BANKER_WIN"
143
+ }
144
+ export declare enum BaccaratBetType {
145
+ PLAYER = "PLAYER",
146
+ TIE = "TIE",
147
+ BANKER = "BANKER"
148
+ }
149
+ export interface BaccaratGameOutputs {
150
+ playerCards: Card[];
151
+ playerHandValue: number;
152
+ bankerCards: Card[];
153
+ bankerHandValue: number;
154
+ gameOutcome: BaccaratOutcome;
155
+ }
156
+ export declare const calculateBaccaratBetAmount: (gameInputs: BaccaratGameInputs) => Big$1;
157
+ export declare class Baccarat extends Game<BaccaratGameInputs, BaccaratGameOutputs> {
158
+ constructor();
159
+ protected determineGameResult({ generator, gameInputs, edge }: GetGameResultRequest<BaccaratGameInputs>): GameResult<BaccaratGameOutputs>;
160
+ private validateGameInputs;
161
+ private mapRandomValueToCard;
162
+ private isNaturalWin;
163
+ private mapRandomValueToCardValue;
164
+ private shouldDrawThirdPlayerCard;
165
+ private shouldDrawThirdBankerCard;
166
+ }
167
+ declare const CARD_VALUES: number[];
168
+ declare enum CardSuit {
169
+ Spades = 0,
170
+ Hearts = 1,
171
+ Diamonds = 2,
172
+ Clubs = 3
173
+ }
174
+ declare enum CardRank {
175
+ Ace = 0,
176
+ Two = 1,
177
+ Three = 2,
178
+ Four = 3,
179
+ Five = 4,
180
+ Six = 5,
181
+ Seven = 6,
182
+ Eight = 7,
183
+ Nine = 8,
184
+ Ten = 9,
185
+ Jack = 10,
186
+ Queen = 11,
187
+ King = 12
188
+ }
189
+ export type CardValue = (typeof CARD_VALUES)[number];
190
+ export type CardDto = {
191
+ rank: CardRank;
192
+ suit: CardSuit;
193
+ cardValue: CardValue;
194
+ };
195
+ export declare enum BlackjackAction {
196
+ START = "START",
197
+ HIT = "HIT",
198
+ STAND = "STAND"
199
+ }
200
+ export declare enum BlackjackOutcome {
201
+ WIN = "WIN",
202
+ LOSE = "LOSE",
203
+ PUSH = "PUSH",
204
+ PLAYER_BLACKJACK = "PLAYER_BLACKJACK"
205
+ }
206
+ export interface BlackjackGameInputs {
207
+ previousActions: ReadonlyArray<BlackjackAction>;
208
+ nextAction: BlackjackAction;
209
+ mostRecentState: BlackjackStateDto | null;
210
+ }
211
+ export interface BlackjackHandDto {
212
+ cards: ReadonlyArray<CardDto>;
213
+ value: number;
214
+ }
215
+ export interface BlackjackStateDto {
216
+ playerHand: BlackjackHandDto;
217
+ dealerHand: BlackjackHandDto;
218
+ outcome: BlackjackOutcome | null;
219
+ }
220
+ export interface BlackjackGameOutputs {
221
+ action: BlackjackAction;
222
+ state: BlackjackStateDto;
223
+ }
224
+ export declare class Blackjack extends Game<BlackjackGameInputs, BlackjackGameOutputs> {
225
+ constructor();
226
+ protected determineGameResult({ generator, gameInputs }: GetGameResultRequest<BlackjackGameInputs>): GameResult<BlackjackGameOutputs>;
227
+ }
228
+ declare class Card$1 {
229
+ readonly value: CardValue;
230
+ constructor(rawValue: number);
231
+ get suit(): CardSuit;
232
+ get rank(): CardRank;
233
+ serialise(): CardDto;
234
+ }
235
+ declare class BlackjackCard extends Card$1 {
236
+ get numericRank(): number;
237
+ static fromValue(value: CardValue): BlackjackCard;
238
+ }
239
+ declare class BlackjackHandValue {
240
+ readonly cards: ReadonlyArray<BlackjackCard>;
241
+ readonly hardHandValue: number;
242
+ readonly softHandValue: number | null;
243
+ constructor(cards: ReadonlyArray<BlackjackCard>);
244
+ get cardCount(): number;
245
+ get hasSoftHandValue(): boolean;
246
+ get isBusted(): boolean;
247
+ get isBlackjack(): boolean;
248
+ get highestHandValue(): number;
249
+ serialise(): ReadonlyArray<CardDto>;
250
+ }
251
+ export declare abstract class BlackjackHand {
252
+ readonly cards: ReadonlyArray<BlackjackCard>;
253
+ protected readonly value: BlackjackHandValue;
254
+ protected constructor(rawCards: ReadonlyArray<CardValue>);
255
+ abstract addDrawnCards(newCards: ReadonlyArray<CardValue>): BlackjackHand;
256
+ get isBusted(): boolean;
257
+ get isBlackjack(): boolean;
258
+ get highestHandValue(): number;
259
+ get rawValues(): ReadonlyArray<CardValue>;
260
+ toDto(): BlackjackHandDto;
261
+ }
262
+ declare class MultiplierContainer<TMultipliers> {
263
+ readonly multipliers: Map<number, TMultipliers>;
264
+ constructor(multipliers: Map<number, TMultipliers>);
265
+ getMultipliers(edge: number): TMultipliers;
266
+ getAllMultipliers(): {
267
+ edge: number;
268
+ multipliers: TMultipliers;
269
+ }[];
270
+ }
271
+ export interface DiamondsGameInputs {
272
+ }
273
+ export declare enum DiamondsResultType {
274
+ PAIR = "PAIR",
275
+ TWO_PAIR = "TWO_PAIR",
276
+ THREE_OF_A_KIND = "THREE_OF_A_KIND",
277
+ FULL_HOUSE = "FULL_HOUSE",
278
+ FOUR_OF_A_KIND = "FOUR_OF_A_KIND",
279
+ FIVE_OF_A_KIND = "FIVE_OF_A_KIND"
280
+ }
281
+ export type DiamondsMultipliers = Record<keyof typeof DiamondsResultType, number>;
282
+ export declare const diamondsMultipliers: MultiplierContainer<DiamondsMultipliers>;
283
+ export declare class Diamonds extends Game<DiamondsGameInputs> {
284
+ constructor();
285
+ protected determineGameResult({ generator, edge }: GetGameResultRequest<DiamondsGameInputs>): GameResult;
286
+ private calculatePayoutMultiplier;
287
+ private classifyResult;
288
+ }
289
+ export declare enum DiceDirection {
290
+ ABOVE = "ABOVE",
291
+ BELOW = "BELOW"
292
+ }
293
+ export interface DiceGameInputs {
294
+ direction: DiceDirection;
295
+ selectedValue: number;
296
+ }
297
+ export declare class Dice extends Game<DiceGameInputs> {
298
+ constructor();
299
+ protected determineGameResult({ generator, edge, gameInputs }: GetGameResultRequest<DiceGameInputs>): GameResult;
300
+ }
301
+ export declare enum KenoRiskLevel {
302
+ CLASSIC = "CLASSIC",
303
+ LOW_RISK = "LOW_RISK",
304
+ MEDIUM_RISK = "MEDIUM_RISK",
305
+ HIGH_RISK = "HIGH_RISK"
306
+ }
307
+ export declare const TILE_COUNTS: readonly [
308
+ 1,
309
+ 2,
310
+ 3,
311
+ 4,
312
+ 5,
313
+ 6,
314
+ 7,
315
+ 8,
316
+ 9,
317
+ 10
318
+ ];
319
+ export type TileCount = (typeof TILE_COUNTS)[number];
320
+ export declare const isTileCount: (value: number) => value is TileCount;
321
+ export interface KenoGameInputs {
322
+ riskLevel: KenoRiskLevel;
323
+ selectedNumbers: number[];
324
+ }
325
+ export declare class Keno extends Game<KenoGameInputs> {
326
+ constructor();
327
+ protected determineGameResult({ generator, edge, gameInputs }: GetGameResultRequest<KenoGameInputs>): GameResult;
328
+ }
329
+ export type KenoMultipliers = Record<TileCount, Record<KenoRiskLevel, number[]>>;
330
+ export declare const rtp99Multipliers: KenoMultipliers;
331
+ export declare const rtp98Multipliers: KenoMultipliers;
332
+ export declare const rtp97Multipliers: KenoMultipliers;
333
+ export declare const rtp96Multipliers: KenoMultipliers;
334
+ export declare const rtp92Multipliers: KenoMultipliers;
335
+ export declare const kenoMultipliers: MultiplierContainer<KenoMultipliers>;
336
+ export interface LimboGameInputs {
337
+ targetMultiplier: number;
338
+ }
339
+ export interface LimboGameOutputs {
340
+ randomMultiplier: Big$1;
341
+ }
342
+ export declare class Limbo extends Game<LimboGameInputs, LimboGameOutputs> {
343
+ constructor();
344
+ protected determineGameResult({ generator, edge, gameInputs }: GetGameResultRequest<LimboGameInputs>): GameResult<LimboGameOutputs>;
345
+ }
346
+ export interface MinesGameInputs {
347
+ minesCount: number;
348
+ selectedTiles: number[];
349
+ hasCashedOut: boolean;
350
+ }
351
+ export declare class Mines extends Game<MinesGameInputs> {
352
+ constructor();
353
+ protected determineGameResult({ generator, edge, gameInputs }: GetGameResultRequest<MinesGameInputs>): GameResult;
354
+ }
355
+ export declare enum PlinkoRiskLevel {
356
+ LOW_RISK = "LOW_RISK",
357
+ MEDIUM_RISK = "MEDIUM_RISK",
358
+ HIGH_RISK = "HIGH_RISK"
359
+ }
360
+ export interface PlinkoGameInputs {
361
+ numberOfRows: number;
362
+ riskLevel: PlinkoRiskLevel;
363
+ }
364
+ export declare class Plinko extends Game<PlinkoGameInputs> {
365
+ constructor();
366
+ protected determineGameResult({ generator, gameInputs, edge }: GetGameResultRequest<PlinkoGameInputs>): GameResult;
367
+ }
368
+ export declare const PLINKO_ROW_COUNTS: readonly [
369
+ 8,
370
+ 9,
371
+ 10,
372
+ 11,
373
+ 12,
374
+ 13,
375
+ 14,
376
+ 15,
377
+ 16
378
+ ];
379
+ export type PlinkoRowCount = (typeof PLINKO_ROW_COUNTS)[number];
380
+ export type PlinkoMultiplierSet = Record<PlinkoRowCount, number[]>;
381
+ export type PlinkoMultipliers = Record<PlinkoRiskLevel, PlinkoMultiplierSet>;
382
+ export declare const plinkoMultipliers: MultiplierContainer<PlinkoMultipliers>;
383
+ export declare const VALID_EUROPEAN_STRAIGHTS: readonly [
384
+ 0,
385
+ 1,
386
+ 2,
387
+ 3,
388
+ 4,
389
+ 5,
390
+ 6,
391
+ 7,
392
+ 8,
393
+ 9,
394
+ 10,
395
+ 11,
396
+ 12,
397
+ 13,
398
+ 14,
399
+ 15,
400
+ 16,
401
+ 17,
402
+ 18,
403
+ 19,
404
+ 20,
405
+ 21,
406
+ 22,
407
+ 23,
408
+ 24,
409
+ 25,
410
+ 26,
411
+ 27,
412
+ 28,
413
+ 29,
414
+ 30,
415
+ 31,
416
+ 32,
417
+ 33,
418
+ 34,
419
+ 35,
420
+ 36
421
+ ];
422
+ export type EuropeanStraight = (typeof VALID_EUROPEAN_STRAIGHTS)[number];
423
+ export declare const VALID_AMERICAN_STRAIGHTS: readonly [
424
+ 37,
425
+ 0,
426
+ 1,
427
+ 2,
428
+ 3,
429
+ 4,
430
+ 5,
431
+ 6,
432
+ 7,
433
+ 8,
434
+ 9,
435
+ 10,
436
+ 11,
437
+ 12,
438
+ 13,
439
+ 14,
440
+ 15,
441
+ 16,
442
+ 17,
443
+ 18,
444
+ 19,
445
+ 20,
446
+ 21,
447
+ 22,
448
+ 23,
449
+ 24,
450
+ 25,
451
+ 26,
452
+ 27,
453
+ 28,
454
+ 29,
455
+ 30,
456
+ 31,
457
+ 32,
458
+ 33,
459
+ 34,
460
+ 35,
461
+ 36
462
+ ];
463
+ export type AmericanStraight = (typeof VALID_AMERICAN_STRAIGHTS)[number];
464
+ export interface EuropeanStraightBet extends BaseBet {
465
+ value: EuropeanStraight;
466
+ }
467
+ export interface AmericanStraightBet extends BaseBet {
468
+ value: AmericanStraight;
469
+ }
470
+ export declare const VALID_EUROPEAN_SPLITS: readonly [
471
+ readonly [
472
+ 0,
473
+ 1
474
+ ],
475
+ readonly [
476
+ 0,
477
+ 2
478
+ ],
479
+ readonly [
480
+ 0,
481
+ 3
482
+ ],
483
+ readonly [
484
+ 1,
485
+ 2
486
+ ],
487
+ readonly [
488
+ 1,
489
+ 4
490
+ ],
491
+ readonly [
492
+ 2,
493
+ 3
494
+ ],
495
+ readonly [
496
+ 2,
497
+ 5
498
+ ],
499
+ readonly [
500
+ 3,
501
+ 6
502
+ ],
503
+ readonly [
504
+ 4,
505
+ 5
506
+ ],
507
+ readonly [
508
+ 4,
509
+ 7
510
+ ],
511
+ readonly [
512
+ 5,
513
+ 6
514
+ ],
515
+ readonly [
516
+ 5,
517
+ 8
518
+ ],
519
+ readonly [
520
+ 6,
521
+ 9
522
+ ],
523
+ readonly [
524
+ 7,
525
+ 8
526
+ ],
527
+ readonly [
528
+ 7,
529
+ 10
530
+ ],
531
+ readonly [
532
+ 8,
533
+ 9
534
+ ],
535
+ readonly [
536
+ 8,
537
+ 11
538
+ ],
539
+ readonly [
540
+ 9,
541
+ 12
542
+ ],
543
+ readonly [
544
+ 10,
545
+ 11
546
+ ],
547
+ readonly [
548
+ 10,
549
+ 13
550
+ ],
551
+ readonly [
552
+ 11,
553
+ 12
554
+ ],
555
+ readonly [
556
+ 11,
557
+ 14
558
+ ],
559
+ readonly [
560
+ 12,
561
+ 15
562
+ ],
563
+ readonly [
564
+ 13,
565
+ 14
566
+ ],
567
+ readonly [
568
+ 13,
569
+ 16
570
+ ],
571
+ readonly [
572
+ 14,
573
+ 15
574
+ ],
575
+ readonly [
576
+ 14,
577
+ 17
578
+ ],
579
+ readonly [
580
+ 15,
581
+ 18
582
+ ],
583
+ readonly [
584
+ 16,
585
+ 17
586
+ ],
587
+ readonly [
588
+ 16,
589
+ 19
590
+ ],
591
+ readonly [
592
+ 17,
593
+ 18
594
+ ],
595
+ readonly [
596
+ 17,
597
+ 20
598
+ ],
599
+ readonly [
600
+ 18,
601
+ 21
602
+ ],
603
+ readonly [
604
+ 19,
605
+ 20
606
+ ],
607
+ readonly [
608
+ 19,
609
+ 22
610
+ ],
611
+ readonly [
612
+ 20,
613
+ 21
614
+ ],
615
+ readonly [
616
+ 20,
617
+ 23
618
+ ],
619
+ readonly [
620
+ 21,
621
+ 24
622
+ ],
623
+ readonly [
624
+ 22,
625
+ 23
626
+ ],
627
+ readonly [
628
+ 22,
629
+ 25
630
+ ],
631
+ readonly [
632
+ 23,
633
+ 24
634
+ ],
635
+ readonly [
636
+ 23,
637
+ 26
638
+ ],
639
+ readonly [
640
+ 24,
641
+ 27
642
+ ],
643
+ readonly [
644
+ 25,
645
+ 26
646
+ ],
647
+ readonly [
648
+ 25,
649
+ 28
650
+ ],
651
+ readonly [
652
+ 26,
653
+ 27
654
+ ],
655
+ readonly [
656
+ 26,
657
+ 29
658
+ ],
659
+ readonly [
660
+ 27,
661
+ 30
662
+ ],
663
+ readonly [
664
+ 28,
665
+ 29
666
+ ],
667
+ readonly [
668
+ 28,
669
+ 31
670
+ ],
671
+ readonly [
672
+ 29,
673
+ 30
674
+ ],
675
+ readonly [
676
+ 29,
677
+ 32
678
+ ],
679
+ readonly [
680
+ 30,
681
+ 33
682
+ ],
683
+ readonly [
684
+ 31,
685
+ 32
686
+ ],
687
+ readonly [
688
+ 31,
689
+ 34
690
+ ],
691
+ readonly [
692
+ 32,
693
+ 33
694
+ ],
695
+ readonly [
696
+ 32,
697
+ 35
698
+ ],
699
+ readonly [
700
+ 33,
701
+ 36
702
+ ],
703
+ readonly [
704
+ 34,
705
+ 35
706
+ ],
707
+ readonly [
708
+ 35,
709
+ 36
710
+ ]
711
+ ];
712
+ export type EuropeanSplit = (typeof VALID_EUROPEAN_SPLITS)[number];
713
+ export interface EuropeanSplitBet extends BaseBet {
714
+ values: EuropeanSplit;
715
+ }
716
+ export declare const VALID_AMERICAN_SPLITS: readonly [
717
+ readonly [
718
+ 0,
719
+ 1
720
+ ],
721
+ readonly [
722
+ 0,
723
+ 37
724
+ ],
725
+ readonly [
726
+ 3,
727
+ 37
728
+ ],
729
+ readonly [
730
+ 1,
731
+ 2
732
+ ],
733
+ readonly [
734
+ 1,
735
+ 4
736
+ ],
737
+ readonly [
738
+ 2,
739
+ 3
740
+ ],
741
+ readonly [
742
+ 2,
743
+ 5
744
+ ],
745
+ readonly [
746
+ 3,
747
+ 6
748
+ ],
749
+ readonly [
750
+ 4,
751
+ 5
752
+ ],
753
+ readonly [
754
+ 4,
755
+ 7
756
+ ],
757
+ readonly [
758
+ 5,
759
+ 6
760
+ ],
761
+ readonly [
762
+ 5,
763
+ 8
764
+ ],
765
+ readonly [
766
+ 6,
767
+ 9
768
+ ],
769
+ readonly [
770
+ 7,
771
+ 8
772
+ ],
773
+ readonly [
774
+ 7,
775
+ 10
776
+ ],
777
+ readonly [
778
+ 8,
779
+ 9
780
+ ],
781
+ readonly [
782
+ 8,
783
+ 11
784
+ ],
785
+ readonly [
786
+ 9,
787
+ 12
788
+ ],
789
+ readonly [
790
+ 10,
791
+ 11
792
+ ],
793
+ readonly [
794
+ 10,
795
+ 13
796
+ ],
797
+ readonly [
798
+ 11,
799
+ 12
800
+ ],
801
+ readonly [
802
+ 11,
803
+ 14
804
+ ],
805
+ readonly [
806
+ 12,
807
+ 15
808
+ ],
809
+ readonly [
810
+ 13,
811
+ 14
812
+ ],
813
+ readonly [
814
+ 13,
815
+ 16
816
+ ],
817
+ readonly [
818
+ 14,
819
+ 15
820
+ ],
821
+ readonly [
822
+ 14,
823
+ 17
824
+ ],
825
+ readonly [
826
+ 15,
827
+ 18
828
+ ],
829
+ readonly [
830
+ 16,
831
+ 17
832
+ ],
833
+ readonly [
834
+ 16,
835
+ 19
836
+ ],
837
+ readonly [
838
+ 17,
839
+ 18
840
+ ],
841
+ readonly [
842
+ 17,
843
+ 20
844
+ ],
845
+ readonly [
846
+ 18,
847
+ 21
848
+ ],
849
+ readonly [
850
+ 19,
851
+ 20
852
+ ],
853
+ readonly [
854
+ 19,
855
+ 22
856
+ ],
857
+ readonly [
858
+ 20,
859
+ 21
860
+ ],
861
+ readonly [
862
+ 20,
863
+ 23
864
+ ],
865
+ readonly [
866
+ 21,
867
+ 24
868
+ ],
869
+ readonly [
870
+ 22,
871
+ 23
872
+ ],
873
+ readonly [
874
+ 22,
875
+ 25
876
+ ],
877
+ readonly [
878
+ 23,
879
+ 24
880
+ ],
881
+ readonly [
882
+ 23,
883
+ 26
884
+ ],
885
+ readonly [
886
+ 24,
887
+ 27
888
+ ],
889
+ readonly [
890
+ 25,
891
+ 26
892
+ ],
893
+ readonly [
894
+ 25,
895
+ 28
896
+ ],
897
+ readonly [
898
+ 26,
899
+ 27
900
+ ],
901
+ readonly [
902
+ 26,
903
+ 29
904
+ ],
905
+ readonly [
906
+ 27,
907
+ 30
908
+ ],
909
+ readonly [
910
+ 28,
911
+ 29
912
+ ],
913
+ readonly [
914
+ 28,
915
+ 31
916
+ ],
917
+ readonly [
918
+ 29,
919
+ 30
920
+ ],
921
+ readonly [
922
+ 29,
923
+ 32
924
+ ],
925
+ readonly [
926
+ 30,
927
+ 33
928
+ ],
929
+ readonly [
930
+ 31,
931
+ 32
932
+ ],
933
+ readonly [
934
+ 31,
935
+ 34
936
+ ],
937
+ readonly [
938
+ 32,
939
+ 33
940
+ ],
941
+ readonly [
942
+ 32,
943
+ 35
944
+ ],
945
+ readonly [
946
+ 33,
947
+ 36
948
+ ],
949
+ readonly [
950
+ 34,
951
+ 35
952
+ ],
953
+ readonly [
954
+ 35,
955
+ 36
956
+ ]
957
+ ];
958
+ export type AmericanSplit = (typeof VALID_AMERICAN_SPLITS)[number];
959
+ export interface AmericanSplitBet extends BaseBet {
960
+ values: AmericanSplit;
961
+ }
962
+ export declare const VALID_EUROPEAN_STREETS: readonly [
963
+ readonly [
964
+ 0,
965
+ 1,
966
+ 2
967
+ ],
968
+ readonly [
969
+ 0,
970
+ 2,
971
+ 3
972
+ ],
973
+ readonly [
974
+ 1,
975
+ 2,
976
+ 3
977
+ ],
978
+ readonly [
979
+ 4,
980
+ 5,
981
+ 6
982
+ ],
983
+ readonly [
984
+ 7,
985
+ 8,
986
+ 9
987
+ ],
988
+ readonly [
989
+ 10,
990
+ 11,
991
+ 12
992
+ ],
993
+ readonly [
994
+ 13,
995
+ 14,
996
+ 15
997
+ ],
998
+ readonly [
999
+ 16,
1000
+ 17,
1001
+ 18
1002
+ ],
1003
+ readonly [
1004
+ 19,
1005
+ 20,
1006
+ 21
1007
+ ],
1008
+ readonly [
1009
+ 22,
1010
+ 23,
1011
+ 24
1012
+ ],
1013
+ readonly [
1014
+ 25,
1015
+ 26,
1016
+ 27
1017
+ ],
1018
+ readonly [
1019
+ 28,
1020
+ 29,
1021
+ 30
1022
+ ],
1023
+ readonly [
1024
+ 31,
1025
+ 32,
1026
+ 33
1027
+ ],
1028
+ readonly [
1029
+ 34,
1030
+ 35,
1031
+ 36
1032
+ ]
1033
+ ];
1034
+ export type EuropeanStreet = (typeof VALID_EUROPEAN_STREETS)[number];
1035
+ export interface BaseBet {
1036
+ amount: Big$1.Big;
1037
+ }
1038
+ export interface EuropeanStreetBet extends BaseBet {
1039
+ values: EuropeanStreet;
1040
+ }
1041
+ export declare const VALID_AMERICAN_STREETS: readonly [
1042
+ readonly [
1043
+ 0,
1044
+ 1,
1045
+ 2
1046
+ ],
1047
+ readonly [
1048
+ 0,
1049
+ 2,
1050
+ 37
1051
+ ],
1052
+ readonly [
1053
+ 1,
1054
+ 2,
1055
+ 3
1056
+ ],
1057
+ readonly [
1058
+ 2,
1059
+ 3,
1060
+ 37
1061
+ ],
1062
+ readonly [
1063
+ 4,
1064
+ 5,
1065
+ 6
1066
+ ],
1067
+ readonly [
1068
+ 7,
1069
+ 8,
1070
+ 9
1071
+ ],
1072
+ readonly [
1073
+ 10,
1074
+ 11,
1075
+ 12
1076
+ ],
1077
+ readonly [
1078
+ 13,
1079
+ 14,
1080
+ 15
1081
+ ],
1082
+ readonly [
1083
+ 16,
1084
+ 17,
1085
+ 18
1086
+ ],
1087
+ readonly [
1088
+ 19,
1089
+ 20,
1090
+ 21
1091
+ ],
1092
+ readonly [
1093
+ 22,
1094
+ 23,
1095
+ 24
1096
+ ],
1097
+ readonly [
1098
+ 25,
1099
+ 26,
1100
+ 27
1101
+ ],
1102
+ readonly [
1103
+ 28,
1104
+ 29,
1105
+ 30
1106
+ ],
1107
+ readonly [
1108
+ 31,
1109
+ 32,
1110
+ 33
1111
+ ],
1112
+ readonly [
1113
+ 34,
1114
+ 35,
1115
+ 36
1116
+ ]
1117
+ ];
1118
+ export type AmericanStreet = (typeof VALID_AMERICAN_STREETS)[number];
1119
+ export interface AmericanStreetBet extends BaseBet {
1120
+ values: AmericanStreet;
1121
+ }
1122
+ export declare const VALID_EUROPEAN_CORNERS: readonly [
1123
+ readonly [
1124
+ 0,
1125
+ 1,
1126
+ 2,
1127
+ 3
1128
+ ],
1129
+ readonly [
1130
+ 1,
1131
+ 2,
1132
+ 4,
1133
+ 5
1134
+ ],
1135
+ readonly [
1136
+ 2,
1137
+ 3,
1138
+ 5,
1139
+ 6
1140
+ ],
1141
+ readonly [
1142
+ 4,
1143
+ 5,
1144
+ 7,
1145
+ 8
1146
+ ],
1147
+ readonly [
1148
+ 5,
1149
+ 6,
1150
+ 8,
1151
+ 9
1152
+ ],
1153
+ readonly [
1154
+ 7,
1155
+ 8,
1156
+ 10,
1157
+ 11
1158
+ ],
1159
+ readonly [
1160
+ 8,
1161
+ 9,
1162
+ 11,
1163
+ 12
1164
+ ],
1165
+ readonly [
1166
+ 10,
1167
+ 11,
1168
+ 13,
1169
+ 14
1170
+ ],
1171
+ readonly [
1172
+ 11,
1173
+ 12,
1174
+ 14,
1175
+ 15
1176
+ ],
1177
+ readonly [
1178
+ 13,
1179
+ 14,
1180
+ 16,
1181
+ 17
1182
+ ],
1183
+ readonly [
1184
+ 14,
1185
+ 15,
1186
+ 17,
1187
+ 18
1188
+ ],
1189
+ readonly [
1190
+ 16,
1191
+ 17,
1192
+ 19,
1193
+ 20
1194
+ ],
1195
+ readonly [
1196
+ 17,
1197
+ 18,
1198
+ 20,
1199
+ 21
1200
+ ],
1201
+ readonly [
1202
+ 19,
1203
+ 20,
1204
+ 22,
1205
+ 23
1206
+ ],
1207
+ readonly [
1208
+ 20,
1209
+ 21,
1210
+ 23,
1211
+ 24
1212
+ ],
1213
+ readonly [
1214
+ 22,
1215
+ 23,
1216
+ 25,
1217
+ 26
1218
+ ],
1219
+ readonly [
1220
+ 23,
1221
+ 24,
1222
+ 26,
1223
+ 27
1224
+ ],
1225
+ readonly [
1226
+ 25,
1227
+ 26,
1228
+ 28,
1229
+ 29
1230
+ ],
1231
+ readonly [
1232
+ 26,
1233
+ 27,
1234
+ 29,
1235
+ 30
1236
+ ],
1237
+ readonly [
1238
+ 28,
1239
+ 29,
1240
+ 31,
1241
+ 32
1242
+ ],
1243
+ readonly [
1244
+ 29,
1245
+ 30,
1246
+ 32,
1247
+ 33
1248
+ ],
1249
+ readonly [
1250
+ 31,
1251
+ 32,
1252
+ 34,
1253
+ 35
1254
+ ],
1255
+ readonly [
1256
+ 32,
1257
+ 33,
1258
+ 35,
1259
+ 36
1260
+ ]
1261
+ ];
1262
+ export type EuropeanCorner = (typeof VALID_EUROPEAN_CORNERS)[number];
1263
+ export interface EuropeanCornerBet extends BaseBet {
1264
+ values: EuropeanCorner;
1265
+ }
1266
+ export declare const VALID_AMERICAN_CORNERS: readonly [
1267
+ readonly [
1268
+ 1,
1269
+ 2,
1270
+ 4,
1271
+ 5
1272
+ ],
1273
+ readonly [
1274
+ 2,
1275
+ 3,
1276
+ 5,
1277
+ 6
1278
+ ],
1279
+ readonly [
1280
+ 4,
1281
+ 5,
1282
+ 7,
1283
+ 8
1284
+ ],
1285
+ readonly [
1286
+ 5,
1287
+ 6,
1288
+ 8,
1289
+ 9
1290
+ ],
1291
+ readonly [
1292
+ 7,
1293
+ 8,
1294
+ 10,
1295
+ 11
1296
+ ],
1297
+ readonly [
1298
+ 8,
1299
+ 9,
1300
+ 11,
1301
+ 12
1302
+ ],
1303
+ readonly [
1304
+ 10,
1305
+ 11,
1306
+ 13,
1307
+ 14
1308
+ ],
1309
+ readonly [
1310
+ 11,
1311
+ 12,
1312
+ 14,
1313
+ 15
1314
+ ],
1315
+ readonly [
1316
+ 13,
1317
+ 14,
1318
+ 16,
1319
+ 17
1320
+ ],
1321
+ readonly [
1322
+ 14,
1323
+ 15,
1324
+ 17,
1325
+ 18
1326
+ ],
1327
+ readonly [
1328
+ 16,
1329
+ 17,
1330
+ 19,
1331
+ 20
1332
+ ],
1333
+ readonly [
1334
+ 17,
1335
+ 18,
1336
+ 20,
1337
+ 21
1338
+ ],
1339
+ readonly [
1340
+ 19,
1341
+ 20,
1342
+ 22,
1343
+ 23
1344
+ ],
1345
+ readonly [
1346
+ 20,
1347
+ 21,
1348
+ 23,
1349
+ 24
1350
+ ],
1351
+ readonly [
1352
+ 22,
1353
+ 23,
1354
+ 25,
1355
+ 26
1356
+ ],
1357
+ readonly [
1358
+ 23,
1359
+ 24,
1360
+ 26,
1361
+ 27
1362
+ ],
1363
+ readonly [
1364
+ 25,
1365
+ 26,
1366
+ 28,
1367
+ 29
1368
+ ],
1369
+ readonly [
1370
+ 26,
1371
+ 27,
1372
+ 29,
1373
+ 30
1374
+ ],
1375
+ readonly [
1376
+ 28,
1377
+ 29,
1378
+ 31,
1379
+ 32
1380
+ ],
1381
+ readonly [
1382
+ 29,
1383
+ 30,
1384
+ 32,
1385
+ 33
1386
+ ],
1387
+ readonly [
1388
+ 31,
1389
+ 32,
1390
+ 34,
1391
+ 35
1392
+ ],
1393
+ readonly [
1394
+ 32,
1395
+ 33,
1396
+ 35,
1397
+ 36
1398
+ ]
1399
+ ];
1400
+ export type AmericanCorner = (typeof VALID_AMERICAN_CORNERS)[number];
1401
+ export interface AmericanCornerBet extends BaseBet {
1402
+ values: AmericanCorner;
1403
+ }
1404
+ export declare const AMERICAN_BASKET: readonly [
1405
+ 0,
1406
+ 1,
1407
+ 2,
1408
+ 3,
1409
+ 37
1410
+ ];
1411
+ export interface AmericanBasketBet extends BaseBet {
1412
+ }
1413
+ export declare const VALID_EUROPEAN_DOUBLE_STREETS: readonly [
1414
+ readonly [
1415
+ 1,
1416
+ 2,
1417
+ 3,
1418
+ 4,
1419
+ 5,
1420
+ 6
1421
+ ],
1422
+ readonly [
1423
+ 4,
1424
+ 5,
1425
+ 6,
1426
+ 7,
1427
+ 8,
1428
+ 9
1429
+ ],
1430
+ readonly [
1431
+ 7,
1432
+ 8,
1433
+ 9,
1434
+ 10,
1435
+ 11,
1436
+ 12
1437
+ ],
1438
+ readonly [
1439
+ 10,
1440
+ 11,
1441
+ 12,
1442
+ 13,
1443
+ 14,
1444
+ 15
1445
+ ],
1446
+ readonly [
1447
+ 13,
1448
+ 14,
1449
+ 15,
1450
+ 16,
1451
+ 17,
1452
+ 18
1453
+ ],
1454
+ readonly [
1455
+ 16,
1456
+ 17,
1457
+ 18,
1458
+ 19,
1459
+ 20,
1460
+ 21
1461
+ ],
1462
+ readonly [
1463
+ 19,
1464
+ 20,
1465
+ 21,
1466
+ 22,
1467
+ 23,
1468
+ 24
1469
+ ],
1470
+ readonly [
1471
+ 22,
1472
+ 23,
1473
+ 24,
1474
+ 25,
1475
+ 26,
1476
+ 27
1477
+ ],
1478
+ readonly [
1479
+ 25,
1480
+ 26,
1481
+ 27,
1482
+ 28,
1483
+ 29,
1484
+ 30
1485
+ ],
1486
+ readonly [
1487
+ 28,
1488
+ 29,
1489
+ 30,
1490
+ 31,
1491
+ 32,
1492
+ 33
1493
+ ],
1494
+ readonly [
1495
+ 31,
1496
+ 32,
1497
+ 33,
1498
+ 34,
1499
+ 35,
1500
+ 36
1501
+ ]
1502
+ ];
1503
+ export type EuropeanDoubleStreet = (typeof VALID_EUROPEAN_DOUBLE_STREETS)[number];
1504
+ export interface EuropeanDoubleStreetBet extends BaseBet {
1505
+ values: EuropeanDoubleStreet;
1506
+ }
1507
+ export declare const VALID_AMERICAN_DOUBLE_STREETS: readonly [
1508
+ readonly [
1509
+ 1,
1510
+ 2,
1511
+ 3,
1512
+ 4,
1513
+ 5,
1514
+ 6
1515
+ ],
1516
+ readonly [
1517
+ 4,
1518
+ 5,
1519
+ 6,
1520
+ 7,
1521
+ 8,
1522
+ 9
1523
+ ],
1524
+ readonly [
1525
+ 7,
1526
+ 8,
1527
+ 9,
1528
+ 10,
1529
+ 11,
1530
+ 12
1531
+ ],
1532
+ readonly [
1533
+ 10,
1534
+ 11,
1535
+ 12,
1536
+ 13,
1537
+ 14,
1538
+ 15
1539
+ ],
1540
+ readonly [
1541
+ 13,
1542
+ 14,
1543
+ 15,
1544
+ 16,
1545
+ 17,
1546
+ 18
1547
+ ],
1548
+ readonly [
1549
+ 16,
1550
+ 17,
1551
+ 18,
1552
+ 19,
1553
+ 20,
1554
+ 21
1555
+ ],
1556
+ readonly [
1557
+ 19,
1558
+ 20,
1559
+ 21,
1560
+ 22,
1561
+ 23,
1562
+ 24
1563
+ ],
1564
+ readonly [
1565
+ 22,
1566
+ 23,
1567
+ 24,
1568
+ 25,
1569
+ 26,
1570
+ 27
1571
+ ],
1572
+ readonly [
1573
+ 25,
1574
+ 26,
1575
+ 27,
1576
+ 28,
1577
+ 29,
1578
+ 30
1579
+ ],
1580
+ readonly [
1581
+ 28,
1582
+ 29,
1583
+ 30,
1584
+ 31,
1585
+ 32,
1586
+ 33
1587
+ ],
1588
+ readonly [
1589
+ 31,
1590
+ 32,
1591
+ 33,
1592
+ 34,
1593
+ 35,
1594
+ 36
1595
+ ]
1596
+ ];
1597
+ export type AmericanDoubleStreet = (typeof VALID_AMERICAN_DOUBLE_STREETS)[number];
1598
+ export interface AmericanDoubleStreetBet extends BaseBet {
1599
+ values: AmericanDoubleStreet;
1600
+ }
1601
+ export declare enum Parity {
1602
+ EVEN = "EVEN",
1603
+ ODD = "ODD"
1604
+ }
1605
+ export interface ParityBet extends BaseBet {
1606
+ parity: Parity;
1607
+ }
1608
+ export declare enum Color {
1609
+ RED = "RED",
1610
+ BLACK = "BLACK"
1611
+ }
1612
+ export interface ColorBet extends BaseBet {
1613
+ color: Color;
1614
+ }
1615
+ export declare enum Half {
1616
+ LOW = "LOW",
1617
+ HIGH = "HIGH"
1618
+ }
1619
+ export interface HalfBet extends BaseBet {
1620
+ half: Half;
1621
+ }
1622
+ export declare enum Column {
1623
+ TOP = "TOP",
1624
+ MIDDLE = "MIDDLE",
1625
+ BOTTOM = "BOTTOM"
1626
+ }
1627
+ export interface ColumnBet extends BaseBet {
1628
+ column: Column;
1629
+ }
1630
+ export declare enum Dozen {
1631
+ FIRST = "FIRST",
1632
+ SECOND = "SECOND",
1633
+ THIRD = "THIRD"
1634
+ }
1635
+ export interface DozenBet extends BaseBet {
1636
+ dozen: Dozen;
1637
+ }
1638
+ export interface EuropeanRouletteGameInputs {
1639
+ straightBets: EuropeanStraightBet[];
1640
+ splitBets: EuropeanSplitBet[];
1641
+ streetBets: EuropeanStreetBet[];
1642
+ cornerBets: EuropeanCornerBet[];
1643
+ doubleStreetBets: EuropeanDoubleStreetBet[];
1644
+ parityBets: ParityBet[];
1645
+ colorBets: ColorBet[];
1646
+ halfBets: HalfBet[];
1647
+ columnBets: ColumnBet[];
1648
+ dozenBets: DozenBet[];
1649
+ }
1650
+ export interface AmericanRouletteGameInputs {
1651
+ straightBets: AmericanStraightBet[];
1652
+ splitBets: AmericanSplitBet[];
1653
+ streetBets: AmericanStreetBet[];
1654
+ cornerBets: AmericanCornerBet[];
1655
+ basketBets: AmericanBasketBet[];
1656
+ doubleStreetBets: AmericanDoubleStreetBet[];
1657
+ parityBets: ParityBet[];
1658
+ colorBets: ColorBet[];
1659
+ halfBets: HalfBet[];
1660
+ columnBets: ColumnBet[];
1661
+ dozenBets: DozenBet[];
1662
+ }
1663
+ export declare enum RouletteType {
1664
+ AMERICAN = "AMERICAN",
1665
+ EUROPEAN = "EUROPEAN"
1666
+ }
1667
+ export type RouletteGameInputs = {
1668
+ type: RouletteType.EUROPEAN;
1669
+ inputs: EuropeanRouletteGameInputs;
1670
+ } | {
1671
+ type: RouletteType.AMERICAN;
1672
+ inputs: AmericanRouletteGameInputs;
1673
+ };
1674
+ export interface EuropeanRouletteBetOutcomes {
1675
+ winningBets: EuropeanRouletteGameInputs;
1676
+ losingBets: EuropeanRouletteGameInputs;
1677
+ }
1678
+ export interface AmericanRouletteBetOutcomes {
1679
+ winningBets: AmericanRouletteGameInputs;
1680
+ losingBets: AmericanRouletteGameInputs;
1681
+ }
1682
+ export interface EuropeanRouletteGameOutputs {
1683
+ betOutcomes: EuropeanRouletteBetOutcomes;
1684
+ result: number[];
1685
+ }
1686
+ export interface AmericanRouletteGameOutputs {
1687
+ betOutcomes: AmericanRouletteBetOutcomes;
1688
+ result: number[];
1689
+ }
1690
+ export type RouletteGameOutputs = {
1691
+ type: "european";
1692
+ betOutcomes: EuropeanRouletteBetOutcomes;
1693
+ result: number[];
1694
+ } | {
1695
+ type: "american";
1696
+ betOutcomes: AmericanRouletteBetOutcomes;
1697
+ result: number[];
1698
+ };
1699
+ export declare const PAYOUT_MULTIPLIERS: Record<keyof EuropeanRouletteGameInputs | keyof AmericanRouletteGameInputs, number>;
1700
+ export declare const TOP_COLUMN: number[];
1701
+ export declare const MIDDLE_COLUMN: number[];
1702
+ export declare const BOTTOM_COLUMN: number[];
1703
+ export declare const RED_NUMBERS: number[];
1704
+ export declare const BLACK_NUMBERS: number[];
1705
+ export declare const EUROPEAN_HOUSE_EDGE = 2.7;
1706
+ export declare const AMERICAN_HOUSE_EDGE = 5.3;
1707
+ export type BetPredicate = (bet: BaseBet, result: number) => boolean;
1708
+ declare abstract class BaseRoulette<TInputs extends {
1709
+ straightBets: BaseBet[];
1710
+ splitBets: BaseBet[];
1711
+ streetBets: BaseBet[];
1712
+ cornerBets: BaseBet[];
1713
+ doubleStreetBets: BaseBet[];
1714
+ parityBets: BaseBet[];
1715
+ colorBets: BaseBet[];
1716
+ halfBets: BaseBet[];
1717
+ columnBets: BaseBet[];
1718
+ dozenBets: BaseBet[];
1719
+ }, TOutputs extends {
1720
+ betOutcomes: {
1721
+ winningBets: TInputs;
1722
+ losingBets: TInputs;
1723
+ };
1724
+ result: number[];
1725
+ }> extends Game<TInputs, TOutputs> {
1726
+ protected abstract readonly maxNumber: number;
1727
+ constructor();
1728
+ determineGameResult({ generator, gameInputs }: GetGameResultRequest<TInputs>): GameResult<TOutputs>;
1729
+ getBetAmount(gameInputs: TInputs): Big$1.Big;
1730
+ getPayoutDetails(gameInputs: TInputs, gameResult: number): {
1731
+ payoutMultiplier: Big$1.Big;
1732
+ payoutAmount: Big$1.Big;
1733
+ };
1734
+ protected determineBetOutcomes(inputs: TInputs, result: number): {
1735
+ winningBets: TInputs;
1736
+ losingBets: TInputs;
1737
+ };
1738
+ protected calculateTotalAmount(bets: {
1739
+ amount: Big$1.Big;
1740
+ }[]): Big$1.Big;
1741
+ protected isWinningStraightBet(bet: BaseBet, gameResult: number): boolean;
1742
+ protected isWinningSplitBet(bet: BaseBet, gameResult: number): boolean;
1743
+ protected isWinningStreetBet(bet: BaseBet, gameResult: number): boolean;
1744
+ protected isWinningCornerBet(bet: BaseBet, gameResult: number): boolean;
1745
+ protected isWinningDoubleStreetBet(bet: BaseBet, gameResult: number): boolean;
1746
+ protected isWinningColorBet(bet: BaseBet, gameResult: number): boolean;
1747
+ protected isWinningHalfBet(bet: BaseBet, gameResult: number): boolean;
1748
+ protected isWinningColumnBet(bet: BaseBet, gameResult: number): boolean;
1749
+ protected isWinningDozenBet(bet: BaseBet, gameResult: number): boolean;
1750
+ protected isWinningParityBet(bet: BaseBet, gameResult: number): boolean;
1751
+ protected getBetTotals(inputs: TInputs): Record<keyof TInputs, Big$1.Big>;
1752
+ protected calculateTotalBetAmount(totals: Record<keyof TInputs, Big$1.Big>): Big$1.Big;
1753
+ protected abstract validateInputs(inputs: TInputs): void;
1754
+ protected abstract readonly betPredicates: Record<keyof TInputs, BetPredicate>;
1755
+ private partitionBets;
1756
+ private calculateTotalPayout;
1757
+ }
1758
+ export declare class EuropeanRoulette extends BaseRoulette<EuropeanRouletteGameInputs, EuropeanRouletteGameOutputs> {
1759
+ protected readonly maxNumber = 36;
1760
+ protected readonly betPredicates: Record<keyof EuropeanRouletteGameInputs, BetPredicate>;
1761
+ protected validateInputs(inputs: EuropeanRouletteGameInputs): void;
1762
+ }
1763
+ export declare class AmericanRoulette extends BaseRoulette<AmericanRouletteGameInputs, AmericanRouletteGameOutputs> {
1764
+ protected readonly maxNumber = 37;
1765
+ protected readonly betPredicates: Record<keyof AmericanRouletteGameInputs, BetPredicate>;
1766
+ protected validateInputs(inputs: AmericanRouletteGameInputs): void;
1767
+ protected isWinningBasketBet(_bet: BaseBet, gameResult: number): boolean;
1768
+ }
1769
+ export declare class Roulette extends Game<RouletteGameInputs, RouletteGameOutputs> {
1770
+ private readonly europeanGame;
1771
+ private readonly americanGame;
1772
+ constructor();
1773
+ getBetAmount(gameInputs: RouletteGameInputs): Big$1.Big;
1774
+ protected determineGameResult(request: GetGameResultRequest<RouletteGameInputs>): GameResult<RouletteGameOutputs>;
1775
+ }
1776
+ export declare const calculateRouletteBetAmount: (gameInputs: RouletteGameInputs) => Big$1.Big;
1777
+ export declare const validateRouletteGameInputs: (gameInputs: RouletteGameInputs) => void;
1778
+ export declare enum WheelRiskLevel {
1779
+ LOW_RISK = "LOW_RISK",
1780
+ MEDIUM_RISK = "MEDIUM_RISK",
1781
+ HIGH_RISK = "HIGH_RISK"
1782
+ }
1783
+ export declare enum WheelSegments {
1784
+ TEN = 10,
1785
+ TWENTY = 20,
1786
+ THIRTY = 30,
1787
+ FORTY = 40,
1788
+ FIFTY = 50
1789
+ }
1790
+ export interface WheelGameInputs {
1791
+ segments: WheelSegments;
1792
+ riskLevel: WheelRiskLevel;
1793
+ }
1794
+ export declare class Wheel extends Game<WheelGameInputs> {
1795
+ constructor();
1796
+ protected determineGameResult({ generator, gameInputs, edge }: GetGameResultRequest<WheelGameInputs>): GameResult;
1797
+ }
1798
+ export declare enum GameErrorCode {
1799
+ INPUT_VALIDATION_ERROR = "INPUT_VALIDATION_ERROR"
1800
+ }
1801
+ export declare class GameError extends Error {
1802
+ static createValidationError(message: string): GameError;
1803
+ static isGameError(error: unknown): error is GameError;
1804
+ errorCode: GameErrorCode;
1805
+ constructor(errorCode: GameErrorCode, message?: string);
1806
+ }
1807
+
1808
+ export {};