@actuallyfair/verifier 0.0.5 → 0.0.6

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.
@@ -1,495 +1,578 @@
1
- import { DuelPlinkoRisk } from "./generated/context/plinko";
1
+ import { PlinkoPayoutTable } from "./generated/context/plinko";
2
2
 
3
- export const DUEL_PLINKO_RISK_KEYS = ["low", "medium", "high"] as const;
4
- export type DuelPlinkoRiskKey = (typeof DUEL_PLINKO_RISK_KEYS)[number];
3
+ export const PLINKO_RISK_KEYS = ["low", "medium", "high"] as const;
4
+ export type PlinkoRiskKey = (typeof PLINKO_RISK_KEYS)[number];
5
5
 
6
- const DUEL_PLINKO_RISK_ENUM_BY_KEY: Record<DuelPlinkoRiskKey, DuelPlinkoRisk> = {
7
- low: DuelPlinkoRisk.DUEL_PLINKO_RISK_LOW,
8
- medium: DuelPlinkoRisk.DUEL_PLINKO_RISK_MEDIUM,
9
- high: DuelPlinkoRisk.DUEL_PLINKO_RISK_HIGH,
10
- };
6
+ export const PLINKO_PAYOUT_TABLE_KEYS = [
7
+ "duel_8_low",
8
+ "duel_8_medium",
9
+ "duel_8_high",
10
+ "duel_9_low",
11
+ "duel_9_medium",
12
+ "duel_9_high",
13
+ "duel_10_low",
14
+ "duel_10_medium",
15
+ "duel_10_high",
16
+ "duel_11_low",
17
+ "duel_11_medium",
18
+ "duel_11_high",
19
+ "duel_12_low",
20
+ "duel_12_medium",
21
+ "duel_12_high",
22
+ "duel_13_low",
23
+ "duel_13_medium",
24
+ "duel_13_high",
25
+ "duel_14_low",
26
+ "duel_14_medium",
27
+ "duel_14_high",
28
+ "duel_15_low",
29
+ "duel_15_medium",
30
+ "duel_15_high",
31
+ "duel_16_low",
32
+ "duel_16_medium",
33
+ "duel_16_high",
34
+ ] as const;
35
+ export type PlinkoPayoutTableKey = (typeof PLINKO_PAYOUT_TABLE_KEYS)[number];
11
36
 
12
- const DUEL_PLINKO_RISK_KEY_BY_ENUM: Partial<Record<DuelPlinkoRisk, DuelPlinkoRiskKey>> = {
13
- [DuelPlinkoRisk.DUEL_PLINKO_RISK_LOW]: "low",
14
- [DuelPlinkoRisk.DUEL_PLINKO_RISK_MEDIUM]: "medium",
15
- [DuelPlinkoRisk.DUEL_PLINKO_RISK_HIGH]: "high",
37
+ const PLINKO_PAYOUT_TABLE_ENUM_BY_KEY: Record<
38
+ PlinkoPayoutTableKey,
39
+ PlinkoPayoutTable
40
+ > = {
41
+ duel_8_low: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_8_LOW,
42
+ duel_8_medium: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_8_MEDIUM,
43
+ duel_8_high: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_8_HIGH,
44
+ duel_9_low: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_9_LOW,
45
+ duel_9_medium: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_9_MEDIUM,
46
+ duel_9_high: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_9_HIGH,
47
+ duel_10_low: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_10_LOW,
48
+ duel_10_medium: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_10_MEDIUM,
49
+ duel_10_high: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_10_HIGH,
50
+ duel_11_low: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_11_LOW,
51
+ duel_11_medium: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_11_MEDIUM,
52
+ duel_11_high: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_11_HIGH,
53
+ duel_12_low: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_12_LOW,
54
+ duel_12_medium: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_12_MEDIUM,
55
+ duel_12_high: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_12_HIGH,
56
+ duel_13_low: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_13_LOW,
57
+ duel_13_medium: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_13_MEDIUM,
58
+ duel_13_high: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_13_HIGH,
59
+ duel_14_low: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_14_LOW,
60
+ duel_14_medium: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_14_MEDIUM,
61
+ duel_14_high: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_14_HIGH,
62
+ duel_15_low: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_15_LOW,
63
+ duel_15_medium: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_15_MEDIUM,
64
+ duel_15_high: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_15_HIGH,
65
+ duel_16_low: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_16_LOW,
66
+ duel_16_medium: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_16_MEDIUM,
67
+ duel_16_high: PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_16_HIGH,
16
68
  };
17
69
 
18
- export const DUEL_PLINKO_PAYOUTS: Record<
19
- number,
20
- Record<DuelPlinkoRiskKey, number[]>
70
+ const PLINKO_PAYOUT_TABLE_KEY_BY_ENUM: Partial<
71
+ Record<PlinkoPayoutTable, PlinkoPayoutTableKey>
21
72
  > = {
22
- "8": {
23
- "low": [
24
- 5.6518011,
25
- 2.11942541,
26
- 1.11017522,
27
- 1.0092502,
28
- 0.5046251,
29
- 1.0092502,
30
- 1.11017522,
31
- 2.11942541,
32
- 5.6518011
33
- ],
34
- "medium": [
35
- 13.13061611,
36
- 3.03014218,
37
- 1.31306161,
38
- 0.70703318,
39
- 0.40401896,
40
- 0.70703318,
41
- 1.31306161,
42
- 3.03014218,
43
- 13.13061611
44
- ],
45
- "high": [
46
- 29.2451735,
47
- 4.03381703,
48
- 1.51268139,
49
- 0.30253628,
50
- 0.20169085,
51
- 0.30253628,
52
- 1.51268139,
53
- 4.03381703,
54
- 29.2451735
55
- ]
56
- },
57
- "9": {
58
- "low": [
59
- 5.6518011,
60
- 2.01850039,
61
- 1.61480032,
62
- 1.0092502,
63
- 0.70647514,
64
- 0.70647514,
65
- 1.0092502,
66
- 1.61480032,
67
- 2.01850039,
68
- 5.6518011
69
- ],
70
- "medium": [
71
- 18.13787234,
72
- 4.0306383,
73
- 1.71302128,
74
- 0.90689362,
75
- 0.50382979,
76
- 0.50382979,
77
- 0.90689362,
78
- 1.71302128,
79
- 4.0306383,
80
- 18.13787234
81
- ],
82
- "high": [
83
- 43.36353312,
84
- 7.05917981,
85
- 2.01690852,
86
- 0.60507256,
87
- 0.20169085,
88
- 0.20169085,
89
- 0.60507256,
90
- 2.01690852,
91
- 7.05917981,
92
- 43.36353312
93
- ]
94
- },
95
- "10": {
96
- "low": [
97
- 8.98055474,
98
- 3.02715328,
99
- 1.41267153,
100
- 1.1099562,
101
- 1.00905109,
102
- 0.50452555,
103
- 1.00905109,
104
- 1.1099562,
105
- 1.41267153,
106
- 3.02715328,
107
- 8.98055474
108
- ],
109
- "medium": [
110
- 22.22104265,
111
- 5.05023697,
112
- 2.02009479,
113
- 1.41406635,
114
- 0.60602844,
115
- 0.40401896,
116
- 0.60602844,
117
- 1.41406635,
118
- 2.02009479,
119
- 5.05023697,
120
- 22.22104265
121
- ],
122
- "high": [
123
- 76.64252366,
124
- 10.08454259,
125
- 3.02536278,
126
- 0.90760883,
127
- 0.30253628,
128
- 0.20169085,
129
- 0.30253628,
130
- 0.90760883,
131
- 3.02536278,
132
- 10.08454259,
133
- 76.64252366
134
- ]
135
- },
136
- "11": {
137
- "low": [
138
- 8.4760292,
139
- 3.02715328,
140
- 1.91719708,
141
- 1.31176642,
142
- 1.00905109,
143
- 0.70633577,
144
- 0.70633577,
145
- 1.00905109,
146
- 1.31176642,
147
- 1.91719708,
148
- 3.02715328,
149
- 8.4760292
150
- ],
151
- "medium": [
152
- 24.2124497,
153
- 6.05311243,
154
- 3.02655621,
155
- 1.81593373,
156
- 0.70619645,
157
- 0.50442604,
158
- 0.50442604,
159
- 0.70619645,
160
- 1.81593373,
161
- 3.02655621,
162
- 6.05311243,
163
- 24.2124497
164
- ],
165
- "high": [
166
- 120.89533189,
167
- 14.10445539,
168
- 5.23879772,
169
- 1.41044554,
170
- 0.40298444,
171
- 0.20149222,
172
- 0.20149222,
173
- 0.40298444,
174
- 1.41044554,
175
- 5.23879772,
176
- 14.10445539,
177
- 120.89533189
178
- ]
179
- },
180
- "12": {
181
- "low": [
182
- 10.09299985,
183
- 3.02789996,
184
- 1.61487998,
185
- 1.41301998,
186
- 1.11022998,
187
- 1.00929999,
188
- 0.50464999,
189
- 1.00929999,
190
- 1.11022998,
191
- 1.41301998,
192
- 1.61487998,
193
- 3.02789996,
194
- 10.09299985
195
- ],
196
- "medium": [
197
- 33.30361367,
198
- 11.10120456,
199
- 4.03680166,
200
- 2.01840083,
201
- 1.11012046,
202
- 0.60552025,
203
- 0.30276012,
204
- 0.60552025,
205
- 1.11012046,
206
- 2.01840083,
207
- 4.03680166,
208
- 11.10120456,
209
- 33.30361367
210
- ],
211
- "high": [
212
- 171.34432238,
213
- 24.18978669,
214
- 8.16405301,
215
- 2.01581556,
216
- 0.70553545,
217
- 0.20158156,
218
- 0.20158156,
219
- 0.20158156,
220
- 0.70553545,
221
- 2.01581556,
222
- 8.16405301,
223
- 24.18978669,
224
- 171.34432238
225
- ]
226
- },
227
- "13": {
228
- "low": [
229
- 8.17371699,
230
- 4.03640345,
231
- 3.02730259,
232
- 1.91729164,
233
- 1.21092104,
234
- 0.90819078,
235
- 0.7063706,
236
- 0.7063706,
237
- 0.90819078,
238
- 1.21092104,
239
- 1.91729164,
240
- 3.02730259,
241
- 4.03640345,
242
- 8.17371699
243
- ],
244
- "medium": [
245
- 43.39347736,
246
- 13.11895827,
247
- 6.05490382,
248
- 3.02745191,
249
- 1.31189583,
250
- 0.70640545,
251
- 0.40366025,
252
- 0.40366025,
253
- 0.70640545,
254
- 1.31189583,
255
- 3.02745191,
256
- 6.05490382,
257
- 13.11895827,
258
- 43.39347736
259
- ],
260
- "high": [
261
- 262.13350416,
262
- 37.30361405,
263
- 11.09026364,
264
- 4.03282314,
265
- 1.00820579,
266
- 0.20164116,
267
- 0.20164116,
268
- 0.20164116,
269
- 0.20164116,
270
- 1.00820579,
271
- 4.03282314,
272
- 11.09026364,
273
- 37.30361405,
274
- 262.13350416
275
- ]
276
- },
277
- "14": {
278
- "low": [
279
- 7.16452779,
280
- 4.03635368,
281
- 1.917268,
282
- 1.41272379,
283
- 1.31181495,
284
- 1.10999726,
285
- 1.00908842,
286
- 0.50454421,
287
- 1.00908842,
288
- 1.10999726,
289
- 1.31181495,
290
- 1.41272379,
291
- 1.917268,
292
- 4.03635368,
293
- 7.16452779
294
- ],
295
- "medium": [
296
- 58.5307369,
297
- 15.13725954,
298
- 7.06405445,
299
- 4.03660255,
300
- 1.91738621,
301
- 1.00915064,
302
- 0.50457532,
303
- 0.20183013,
304
- 0.50457532,
305
- 1.00915064,
306
- 1.91738621,
307
- 4.03660255,
308
- 7.06405445,
309
- 15.13725954,
310
- 58.5307369
311
- ],
312
- "high": [
313
- 423.91122183,
314
- 56.52149624,
315
- 18.16762379,
316
- 5.04656216,
317
- 1.91769362,
318
- 0.30279373,
319
- 0.20186249,
320
- 0.20186249,
321
- 0.20186249,
322
- 0.30279373,
323
- 1.91769362,
324
- 5.04656216,
325
- 18.16762379,
326
- 56.52149624,
327
- 423.91122183
328
- ]
329
- },
330
- "15": {
331
- "low": [
332
- 15.13623299,
333
- 8.0726576,
334
- 3.0272466,
335
- 2.0181644,
336
- 1.5136233,
337
- 1.10999042,
338
- 1.0090822,
339
- 0.70635754,
340
- 0.70635754,
341
- 1.0090822,
342
- 1.10999042,
343
- 1.5136233,
344
- 2.0181644,
345
- 3.0272466,
346
- 8.0726576,
347
- 15.13623299
348
- ],
349
- "medium": [
350
- 88.80142344,
351
- 18.16392752,
352
- 11.10017793,
353
- 5.04553542,
354
- 3.02732125,
355
- 1.31183921,
356
- 0.50455354,
357
- 0.30273213,
358
- 0.30273213,
359
- 0.50455354,
360
- 1.31183921,
361
- 3.02732125,
362
- 5.04553542,
363
- 11.10017793,
364
- 18.16392752,
365
- 88.80142344
366
- ],
367
- "high": [
368
- 625.46900798,
369
- 83.73214139,
370
- 27.23816648,
371
- 8.07056784,
372
- 3.02646294,
373
- 0.50441049,
374
- 0.2017642,
375
- 0.2017642,
376
- 0.2017642,
377
- 0.2017642,
378
- 0.50441049,
379
- 3.02646294,
380
- 8.07056784,
381
- 27.23816648,
382
- 83.73214139,
383
- 625.46900798
384
- ]
385
- },
386
- "16": {
387
- "low": [
388
- 16.14566358,
389
- 9.08193576,
390
- 2.01820795,
391
- 1.41274556,
392
- 1.41274556,
393
- 1.21092477,
394
- 1.11001437,
395
- 1.00910397,
396
- 0.50455199,
397
- 1.00910397,
398
- 1.11001437,
399
- 1.21092477,
400
- 1.41274556,
401
- 1.41274556,
402
- 2.01820795,
403
- 9.08193576,
404
- 16.14566358
405
- ],
406
- "medium": [
407
- 111.01307231,
408
- 41.37759968,
409
- 10.09209748,
410
- 5.04604874,
411
- 3.02762924,
412
- 1.51381462,
413
- 1.00920975,
414
- 0.50460487,
415
- 0.30276292,
416
- 0.50460487,
417
- 1.00920975,
418
- 1.51381462,
419
- 3.02762924,
420
- 5.04604874,
421
- 10.09209748,
422
- 41.37759968,
423
- 111.01307231
424
- ],
425
- "high": [
426
- 1009.33110512,
427
- 131.21304367,
428
- 26.24260873,
429
- 9.08397995,
430
- 4.03732442,
431
- 2.01866221,
432
- 0.20186622,
433
- 0.20186622,
434
- 0.20186622,
435
- 0.20186622,
436
- 0.20186622,
437
- 2.01866221,
438
- 4.03732442,
439
- 9.08397995,
440
- 26.24260873,
441
- 131.21304367,
442
- 1009.33110512
443
- ]
444
- }
73
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_8_LOW]: "duel_8_low",
74
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_8_MEDIUM]: "duel_8_medium",
75
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_8_HIGH]: "duel_8_high",
76
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_9_LOW]: "duel_9_low",
77
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_9_MEDIUM]: "duel_9_medium",
78
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_9_HIGH]: "duel_9_high",
79
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_10_LOW]: "duel_10_low",
80
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_10_MEDIUM]: "duel_10_medium",
81
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_10_HIGH]: "duel_10_high",
82
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_11_LOW]: "duel_11_low",
83
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_11_MEDIUM]: "duel_11_medium",
84
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_11_HIGH]: "duel_11_high",
85
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_12_LOW]: "duel_12_low",
86
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_12_MEDIUM]: "duel_12_medium",
87
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_12_HIGH]: "duel_12_high",
88
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_13_LOW]: "duel_13_low",
89
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_13_MEDIUM]: "duel_13_medium",
90
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_13_HIGH]: "duel_13_high",
91
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_14_LOW]: "duel_14_low",
92
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_14_MEDIUM]: "duel_14_medium",
93
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_14_HIGH]: "duel_14_high",
94
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_15_LOW]: "duel_15_low",
95
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_15_MEDIUM]: "duel_15_medium",
96
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_15_HIGH]: "duel_15_high",
97
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_16_LOW]: "duel_16_low",
98
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_16_MEDIUM]: "duel_16_medium",
99
+ [PlinkoPayoutTable.PLINKO_PAYOUT_TABLE_DUEL_16_HIGH]: "duel_16_high",
100
+ };
101
+
102
+ export const PLINKO_PAYOUT_TABLES: Record<PlinkoPayoutTableKey, number[]> = {
103
+ duel_8_low: [
104
+ 5.6518011,
105
+ 2.11942541,
106
+ 1.11017522,
107
+ 1.0092502,
108
+ 0.5046251,
109
+ 1.0092502,
110
+ 1.11017522,
111
+ 2.11942541,
112
+ 5.6518011,
113
+ ],
114
+ duel_8_medium: [
115
+ 13.13061611,
116
+ 3.03014218,
117
+ 1.31306161,
118
+ 0.70703318,
119
+ 0.40401896,
120
+ 0.70703318,
121
+ 1.31306161,
122
+ 3.03014218,
123
+ 13.13061611,
124
+ ],
125
+ duel_8_high: [
126
+ 29.2451735,
127
+ 4.03381703,
128
+ 1.51268139,
129
+ 0.30253628,
130
+ 0.20169085,
131
+ 0.30253628,
132
+ 1.51268139,
133
+ 4.03381703,
134
+ 29.2451735,
135
+ ],
136
+ duel_9_low: [
137
+ 5.6518011,
138
+ 2.01850039,
139
+ 1.61480032,
140
+ 1.0092502,
141
+ 0.70647514,
142
+ 0.70647514,
143
+ 1.0092502,
144
+ 1.61480032,
145
+ 2.01850039,
146
+ 5.6518011,
147
+ ],
148
+ duel_9_medium: [
149
+ 18.13787234,
150
+ 4.0306383,
151
+ 1.71302128,
152
+ 0.90689362,
153
+ 0.50382979,
154
+ 0.50382979,
155
+ 0.90689362,
156
+ 1.71302128,
157
+ 4.0306383,
158
+ 18.13787234,
159
+ ],
160
+ duel_9_high: [
161
+ 43.36353312,
162
+ 7.05917981,
163
+ 2.01690852,
164
+ 0.60507256,
165
+ 0.20169085,
166
+ 0.20169085,
167
+ 0.60507256,
168
+ 2.01690852,
169
+ 7.05917981,
170
+ 43.36353312,
171
+ ],
172
+ duel_10_low: [
173
+ 8.98055474,
174
+ 3.02715328,
175
+ 1.41267153,
176
+ 1.1099562,
177
+ 1.00905109,
178
+ 0.50452555,
179
+ 1.00905109,
180
+ 1.1099562,
181
+ 1.41267153,
182
+ 3.02715328,
183
+ 8.98055474,
184
+ ],
185
+ duel_10_medium: [
186
+ 22.22104265,
187
+ 5.05023697,
188
+ 2.02009479,
189
+ 1.41406635,
190
+ 0.60602844,
191
+ 0.40401896,
192
+ 0.60602844,
193
+ 1.41406635,
194
+ 2.02009479,
195
+ 5.05023697,
196
+ 22.22104265,
197
+ ],
198
+ duel_10_high: [
199
+ 76.64252366,
200
+ 10.08454259,
201
+ 3.02536278,
202
+ 0.90760883,
203
+ 0.30253628,
204
+ 0.20169085,
205
+ 0.30253628,
206
+ 0.90760883,
207
+ 3.02536278,
208
+ 10.08454259,
209
+ 76.64252366,
210
+ ],
211
+ duel_11_low: [
212
+ 8.4760292,
213
+ 3.02715328,
214
+ 1.91719708,
215
+ 1.31176642,
216
+ 1.00905109,
217
+ 0.70633577,
218
+ 0.70633577,
219
+ 1.00905109,
220
+ 1.31176642,
221
+ 1.91719708,
222
+ 3.02715328,
223
+ 8.4760292,
224
+ ],
225
+ duel_11_medium: [
226
+ 24.2124497,
227
+ 6.05311243,
228
+ 3.02655621,
229
+ 1.81593373,
230
+ 0.70619645,
231
+ 0.50442604,
232
+ 0.50442604,
233
+ 0.70619645,
234
+ 1.81593373,
235
+ 3.02655621,
236
+ 6.05311243,
237
+ 24.2124497,
238
+ ],
239
+ duel_11_high: [
240
+ 120.89533189,
241
+ 14.10445539,
242
+ 5.23879772,
243
+ 1.41044554,
244
+ 0.40298444,
245
+ 0.20149222,
246
+ 0.20149222,
247
+ 0.40298444,
248
+ 1.41044554,
249
+ 5.23879772,
250
+ 14.10445539,
251
+ 120.89533189,
252
+ ],
253
+ duel_12_low: [
254
+ 10.09299985,
255
+ 3.02789996,
256
+ 1.61487998,
257
+ 1.41301998,
258
+ 1.11022998,
259
+ 1.00929999,
260
+ 0.50464999,
261
+ 1.00929999,
262
+ 1.11022998,
263
+ 1.41301998,
264
+ 1.61487998,
265
+ 3.02789996,
266
+ 10.09299985,
267
+ ],
268
+ duel_12_medium: [
269
+ 33.30361367,
270
+ 11.10120456,
271
+ 4.03680166,
272
+ 2.01840083,
273
+ 1.11012046,
274
+ 0.60552025,
275
+ 0.30276012,
276
+ 0.60552025,
277
+ 1.11012046,
278
+ 2.01840083,
279
+ 4.03680166,
280
+ 11.10120456,
281
+ 33.30361367,
282
+ ],
283
+ duel_12_high: [
284
+ 171.34432238,
285
+ 24.18978669,
286
+ 8.16405301,
287
+ 2.01581556,
288
+ 0.70553545,
289
+ 0.20158156,
290
+ 0.20158156,
291
+ 0.20158156,
292
+ 0.70553545,
293
+ 2.01581556,
294
+ 8.16405301,
295
+ 24.18978669,
296
+ 171.34432238,
297
+ ],
298
+ duel_13_low: [
299
+ 8.17371699,
300
+ 4.03640345,
301
+ 3.02730259,
302
+ 1.91729164,
303
+ 1.21092104,
304
+ 0.90819078,
305
+ 0.7063706,
306
+ 0.7063706,
307
+ 0.90819078,
308
+ 1.21092104,
309
+ 1.91729164,
310
+ 3.02730259,
311
+ 4.03640345,
312
+ 8.17371699,
313
+ ],
314
+ duel_13_medium: [
315
+ 43.39347736,
316
+ 13.11895827,
317
+ 6.05490382,
318
+ 3.02745191,
319
+ 1.31189583,
320
+ 0.70640545,
321
+ 0.40366025,
322
+ 0.40366025,
323
+ 0.70640545,
324
+ 1.31189583,
325
+ 3.02745191,
326
+ 6.05490382,
327
+ 13.11895827,
328
+ 43.39347736,
329
+ ],
330
+ duel_13_high: [
331
+ 262.13350416,
332
+ 37.30361405,
333
+ 11.09026364,
334
+ 4.03282314,
335
+ 1.00820579,
336
+ 0.20164116,
337
+ 0.20164116,
338
+ 0.20164116,
339
+ 0.20164116,
340
+ 1.00820579,
341
+ 4.03282314,
342
+ 11.09026364,
343
+ 37.30361405,
344
+ 262.13350416,
345
+ ],
346
+ duel_14_low: [
347
+ 7.16452779,
348
+ 4.03635368,
349
+ 1.917268,
350
+ 1.41272379,
351
+ 1.31181495,
352
+ 1.10999726,
353
+ 1.00908842,
354
+ 0.50454421,
355
+ 1.00908842,
356
+ 1.10999726,
357
+ 1.31181495,
358
+ 1.41272379,
359
+ 1.917268,
360
+ 4.03635368,
361
+ 7.16452779,
362
+ ],
363
+ duel_14_medium: [
364
+ 58.5307369,
365
+ 15.13725954,
366
+ 7.06405445,
367
+ 4.03660255,
368
+ 1.91738621,
369
+ 1.00915064,
370
+ 0.50457532,
371
+ 0.20183013,
372
+ 0.50457532,
373
+ 1.00915064,
374
+ 1.91738621,
375
+ 4.03660255,
376
+ 7.06405445,
377
+ 15.13725954,
378
+ 58.5307369,
379
+ ],
380
+ duel_14_high: [
381
+ 423.91122183,
382
+ 56.52149624,
383
+ 18.16762379,
384
+ 5.04656216,
385
+ 1.91769362,
386
+ 0.30279373,
387
+ 0.20186249,
388
+ 0.20186249,
389
+ 0.20186249,
390
+ 0.30279373,
391
+ 1.91769362,
392
+ 5.04656216,
393
+ 18.16762379,
394
+ 56.52149624,
395
+ 423.91122183,
396
+ ],
397
+ duel_15_low: [
398
+ 15.13623299,
399
+ 8.0726576,
400
+ 3.0272466,
401
+ 2.0181644,
402
+ 1.5136233,
403
+ 1.10999042,
404
+ 1.0090822,
405
+ 0.70635754,
406
+ 0.70635754,
407
+ 1.0090822,
408
+ 1.10999042,
409
+ 1.5136233,
410
+ 2.0181644,
411
+ 3.0272466,
412
+ 8.0726576,
413
+ 15.13623299,
414
+ ],
415
+ duel_15_medium: [
416
+ 88.80142344,
417
+ 18.16392752,
418
+ 11.10017793,
419
+ 5.04553542,
420
+ 3.02732125,
421
+ 1.31183921,
422
+ 0.50455354,
423
+ 0.30273213,
424
+ 0.30273213,
425
+ 0.50455354,
426
+ 1.31183921,
427
+ 3.02732125,
428
+ 5.04553542,
429
+ 11.10017793,
430
+ 18.16392752,
431
+ 88.80142344,
432
+ ],
433
+ duel_15_high: [
434
+ 625.46900798,
435
+ 83.73214139,
436
+ 27.23816648,
437
+ 8.07056784,
438
+ 3.02646294,
439
+ 0.50441049,
440
+ 0.2017642,
441
+ 0.2017642,
442
+ 0.2017642,
443
+ 0.2017642,
444
+ 0.50441049,
445
+ 3.02646294,
446
+ 8.07056784,
447
+ 27.23816648,
448
+ 83.73214139,
449
+ 625.46900798,
450
+ ],
451
+ duel_16_low: [
452
+ 16.14566358,
453
+ 9.08193576,
454
+ 2.01820795,
455
+ 1.41274556,
456
+ 1.41274556,
457
+ 1.21092477,
458
+ 1.11001437,
459
+ 1.00910397,
460
+ 0.50455199,
461
+ 1.00910397,
462
+ 1.11001437,
463
+ 1.21092477,
464
+ 1.41274556,
465
+ 1.41274556,
466
+ 2.01820795,
467
+ 9.08193576,
468
+ 16.14566358,
469
+ ],
470
+ duel_16_medium: [
471
+ 111.01307231,
472
+ 41.37759968,
473
+ 10.09209748,
474
+ 5.04604874,
475
+ 3.02762924,
476
+ 1.51381462,
477
+ 1.00920975,
478
+ 0.50460487,
479
+ 0.30276292,
480
+ 0.50460487,
481
+ 1.00920975,
482
+ 1.51381462,
483
+ 3.02762924,
484
+ 5.04604874,
485
+ 10.09209748,
486
+ 41.37759968,
487
+ 111.01307231,
488
+ ],
489
+ duel_16_high: [
490
+ 1009.33110512,
491
+ 131.21304367,
492
+ 26.24260873,
493
+ 9.08397995,
494
+ 4.03732442,
495
+ 2.01866221,
496
+ 0.20186622,
497
+ 0.20186622,
498
+ 0.20186622,
499
+ 0.20186622,
500
+ 0.20186622,
501
+ 2.01866221,
502
+ 4.03732442,
503
+ 9.08397995,
504
+ 26.24260873,
505
+ 131.21304367,
506
+ 1009.33110512,
507
+ ],
445
508
  };
446
509
 
447
- const DUEL_PLINKO_ROW_VALUES = Object.keys(DUEL_PLINKO_PAYOUTS)
448
- .map((value) => Number.parseInt(value, 10))
510
+ const PLINKO_ROW_VALUES = Array.from(
511
+ new Set(
512
+ PLINKO_PAYOUT_TABLE_KEYS.map((key) =>
513
+ Number.parseInt(key.split("_")[1] ?? "", 10)
514
+ )
515
+ )
516
+ )
449
517
  .filter((value) => Number.isFinite(value))
450
518
  .sort((a, b) => a - b);
451
519
 
452
- export const DUEL_PLINKO_ROWS = {
453
- min: DUEL_PLINKO_ROW_VALUES[0] ?? 0,
454
- max: DUEL_PLINKO_ROW_VALUES[DUEL_PLINKO_ROW_VALUES.length - 1] ?? 0,
520
+ export const PLINKO_ROWS = {
521
+ min: PLINKO_ROW_VALUES[0] ?? 0,
522
+ max: PLINKO_ROW_VALUES[PLINKO_ROW_VALUES.length - 1] ?? 0,
455
523
  } as const;
456
524
 
457
- export function getDuelPlinkoPayouts(
458
- rows: number,
459
- risk: DuelPlinkoRiskKey
460
- ): number[] {
461
- return DUEL_PLINKO_PAYOUTS[rows]?.[risk] ?? [];
462
- }
463
-
464
- export function isDuelPlinkoRiskKey(value: string): value is DuelPlinkoRiskKey {
465
- return DUEL_PLINKO_RISK_KEYS.includes(value as DuelPlinkoRiskKey);
525
+ export function isPlinkoRiskKey(value: string): value is PlinkoRiskKey {
526
+ return PLINKO_RISK_KEYS.includes(value as PlinkoRiskKey);
466
527
  }
467
528
 
468
- export function isDuelPlinkoRows(rows: number): boolean {
529
+ export function isPlinkoRows(rows: number): boolean {
469
530
  return (
470
531
  Number.isInteger(rows) &&
471
- rows >= DUEL_PLINKO_ROWS.min &&
472
- rows <= DUEL_PLINKO_ROWS.max
532
+ rows >= PLINKO_ROWS.min &&
533
+ rows <= PLINKO_ROWS.max
473
534
  );
474
535
  }
475
536
 
476
- export function duelPlinkoRiskToEnum(value: DuelPlinkoRiskKey): DuelPlinkoRisk {
477
- return DUEL_PLINKO_RISK_ENUM_BY_KEY[value];
537
+ export function getPlinkoPayoutTableKey(
538
+ rows: number,
539
+ risk: PlinkoRiskKey
540
+ ): PlinkoPayoutTableKey | null {
541
+ if (!isPlinkoRows(rows)) {
542
+ return null;
543
+ }
544
+ const key = `duel_${rows}_${risk}`;
545
+ return isPlinkoPayoutTableKey(key) ? key : null;
478
546
  }
479
547
 
480
- export function duelPlinkoRiskFromEnum(
481
- value: DuelPlinkoRisk
482
- ): DuelPlinkoRiskKey | null {
483
- return DUEL_PLINKO_RISK_KEY_BY_ENUM[value] ?? null;
548
+ export function getPlinkoPayouts(key: PlinkoPayoutTableKey): number[] {
549
+ return PLINKO_PAYOUT_TABLES[key] ?? [];
484
550
  }
485
551
 
486
- export function getDuelPlinkoPayoutsFromEnum(
487
- rows: number,
488
- risk: DuelPlinkoRisk
552
+ export function isPlinkoPayoutTableKey(
553
+ value: string
554
+ ): value is PlinkoPayoutTableKey {
555
+ return PLINKO_PAYOUT_TABLE_KEYS.includes(value as PlinkoPayoutTableKey);
556
+ }
557
+
558
+ export function plinkoPayoutTableToEnum(
559
+ value: PlinkoPayoutTableKey
560
+ ): PlinkoPayoutTable {
561
+ return PLINKO_PAYOUT_TABLE_ENUM_BY_KEY[value];
562
+ }
563
+
564
+ export function plinkoPayoutTableFromEnum(
565
+ value: PlinkoPayoutTable
566
+ ): PlinkoPayoutTableKey | null {
567
+ return PLINKO_PAYOUT_TABLE_KEY_BY_ENUM[value] ?? null;
568
+ }
569
+
570
+ export function getPlinkoPayoutsFromEnum(
571
+ value: PlinkoPayoutTable
489
572
  ): number[] {
490
- const key = duelPlinkoRiskFromEnum(risk);
573
+ const key = plinkoPayoutTableFromEnum(value);
491
574
  if (!key) {
492
575
  return [];
493
576
  }
494
- return getDuelPlinkoPayouts(rows, key);
577
+ return getPlinkoPayouts(key);
495
578
  }