tx · EtBy7VhwofvS1nhhXBHBUsx9sxELsry2EwfWEH9uhpjc

3NA7cHZ9oBicev5AEn3BidRAyitA3HdjRbE:  -0.05000000 Waves

2020.04.15 17:58 [955692] smart account 3NA7cHZ9oBicev5AEn3BidRAyitA3HdjRbE > SELF 0.00000000 Waves

{ "type": 13, "id": "EtBy7VhwofvS1nhhXBHBUsx9sxELsry2EwfWEH9uhpjc", "fee": 5000000, "feeAssetId": null, "timestamp": 1586962797438, "version": 1, "sender": "3NA7cHZ9oBicev5AEn3BidRAyitA3HdjRbE", "senderPublicKey": "FEmBffz5oKcY5pLrHbwcj8jxovWVvTYCeNRzNT6uHBJc", "proofs": [ "4ersUihJAwK6838RdpVF2MGsfhMYj9wdLnY8HPPP46MnNNfLcdJegY2j5Mwo4ggMdZpoVDzLWPxC7GGAhipg4f8B" ], "script": "base64:AAIDAAAAAAAAAA4IARIECgIBCBIECgIIAgAAACMAAAAACVJTQVBVQkxJQwkAAlsAAAABAgAAAY9iYXNlNjQ6TUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUFnNGRBUjZYYkJEQVM5aHIvRWozZEp2NkZmYzQ2NngvbU9HTVdVM2xyQUJzM3FhOEJIbXVKR25rZmJwRWYydkF3WVRPV1B2dnpmTTEwT0JiZmxvU3lxM2M5TUt2eVRlMWx1QkxHcVc0dlpVWEl5dlNnejFsaXlVVmVmSVF5M2R5RjlqYmVUWmJDMGJiY1QvN08zREVMKzAxejZBK3JEQ2FjU1owbEdvbFNRNkFuaEx4eklrVnBPUUpickJtQyt4K1p1WlBDTVd6SnluZDVhZU9uN2phai9ta1JWeXhlNmcvME9oV3o0TmlpWlhldU1SQis4bUt5MGZXRC9VbElsWldIc0FTMlptcmtYS3FqTHEwLzB3cjhJTEprem5qU3Fkbkk1SWJqZzN1UXJqLzRBTitpOXIyOGFRNzMvWmtQdFk1U2J3MEFPaUFCQnU3Z0htcTlheVZ4WlFJREFRQUIAAAA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AAAAAECAAAAAV8FAAAADnBsYXllclB1YktleTU4AgAAAAFfCQABkQAAAAIFAAAADGdhbWVEYXRhTGlzdAAAAAAAAAAAAwIAAAABXwUAAAAHcmFuZFN0cgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAGZ2FtZUlkBQAAAA5uZXdHYW1lRGF0YVN0cgkABEwAAAACBQAAABFkZWNyZWFzZWRSZXNlcnZlcwUAAAADbmlsAAAAAPtPlJU=", "chainId": 84, "height": 955692, "spentComplexity": 0 } View: original | compacted Prev: AciMgN56vqSTijC4Y9YntaHSGmdRViYxVGMn6E4DuX4D Next: EHmp5hLEezfQh4yfNRkAhfmPSatigxZbhdQ85uSAoHJY Diff:
OldNewDifferences
99
1010 let WBET = base58'A4q1mYKo11yuH9gmvDodeJoksagcyQzeFE9JtphMWddw'
1111
12-let WALLETWAVESBET = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8')
12+let WALLETCOMMUNITY = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8')
1313
14-let WALLETMCAFEE = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8')
14+let WALLETWAVESBET = Address(base58'3MxK12u62zsu9xh3hU7p5iJncCLANd3zhTZ')
15+
16+let WALLETMCAFEE = Address(base58'3MxK12u62zsu9xh3hU7p5iJncCLANd3zhTZ')
1517
1618 let WAVELET = 100000000
1719
18-let FEEWAVESBET = 4
20+let FEECOMMUNITY = 1
21+
22+let FEEWAVESBET = 3
1923
2024 let FEEMCAFEE = 2
21-
22-let STATESUBMITTED = "SUBMITTED"
23-
24-let STATEWON = "WON"
25-
26-let STATELOST = "LOST"
2725
2826 let BETMIN = (1 * WAVELET)
2927
3028 let BETMAX = (20000000 * WAVELET)
3129
32-let TSTRAIGHT = 1
30+func StraightUpBet (rand,bet) = if ((rand == bet))
31+ then true
32+ else false
3333
34-let TSPLIT = 2
3534
36-let TSTREET = 3
37-
38-let TCORNER = 4
39-
40-let TLINE = 5
41-
42-let TCOLUMN = 6
43-
44-let TDOZEN = 7
45-
46-let TRED = 8
47-
48-let TBLACK = 9
49-
50-let TODD = 10
51-
52-let TEVEN = 11
53-
54-let T1TO18 = 12
55-
56-let T19TO36 = 13
57-
58-let HORIZONTAL = 1
59-
60-let VERTICAL = 2
61-
62-func is0to36 (num) = if (if ((num >= 0))
63- then (37 > num)
35+func SplitBet (rand,bet) = if (if ((rand == 0))
36+ then if (if ((bet == 37))
37+ then true
38+ else (bet == 38))
39+ then true
40+ else (bet == 39)
6441 else false)
6542 then true
66- else throw("Invalid range, try between 0 and 36. Game aborted!")
43+ else if (if ((rand == 1))
44+ then if (if ((bet == 37))
45+ then true
46+ else (bet == 40))
47+ then true
48+ else (bet == 85)
49+ else false)
50+ then true
51+ else if (if ((rand == 2))
52+ then if (if (if ((bet == 38))
53+ then true
54+ else (bet == 41))
55+ then true
56+ else (bet == 73))
57+ then true
58+ else (bet == 85)
59+ else false)
60+ then true
61+ else if (if ((rand == 3))
62+ then if (if ((bet == 39))
63+ then true
64+ else (bet == 42))
65+ then true
66+ else (bet == 73)
67+ else false)
68+ then true
69+ else if (if ((rand == 4))
70+ then if (if ((bet == 40))
71+ then true
72+ else (bet == 43))
73+ then true
74+ else (bet == 86)
75+ else false)
76+ then true
77+ else if (if ((rand == 5))
78+ then if (if (if ((bet == 41))
79+ then true
80+ else (bet == 44))
81+ then true
82+ else (bet == 74))
83+ then true
84+ else (bet == 86)
85+ else false)
86+ then true
87+ else if (if ((rand == 6))
88+ then if (if ((bet == 42))
89+ then true
90+ else (bet == 45))
91+ then true
92+ else (bet == 74)
93+ else false)
94+ then true
95+ else if (if ((rand == 7))
96+ then if (if ((bet == 43))
97+ then true
98+ else (bet == 46))
99+ then true
100+ else (bet == 87)
101+ else false)
102+ then true
103+ else if (if ((rand == 8))
104+ then if (if (if ((bet == 44))
105+ then true
106+ else (bet == 47))
107+ then true
108+ else (bet == 75))
109+ then true
110+ else (bet == 87)
111+ else false)
112+ then true
113+ else if (if ((rand == 9))
114+ then if (if ((bet == 45))
115+ then true
116+ else (bet == 48))
117+ then true
118+ else (bet == 75)
119+ else false)
120+ then true
121+ else if (if ((rand == 10))
122+ then if (if ((bet == 46))
123+ then true
124+ else (bet == 49))
125+ then true
126+ else (bet == 88)
127+ else false)
128+ then true
129+ else if (if ((rand == 11))
130+ then if (if (if ((bet == 47))
131+ then true
132+ else (bet == 50))
133+ then true
134+ else (bet == 76))
135+ then true
136+ else (bet == 88)
137+ else false)
138+ then true
139+ else if (if ((rand == 12))
140+ then if (if ((bet == 48))
141+ then true
142+ else (bet == 51))
143+ then true
144+ else (bet == 76)
145+ else false)
146+ then true
147+ else if (if ((rand == 13))
148+ then if (if ((bet == 49))
149+ then true
150+ else (bet == 52))
151+ then true
152+ else (bet == 89)
153+ else false)
154+ then true
155+ else if (if ((rand == 14))
156+ then if (if (if ((bet == 50))
157+ then true
158+ else (bet == 53))
159+ then true
160+ else (bet == 77))
161+ then true
162+ else (bet == 89)
163+ else false)
164+ then true
165+ else if (if ((rand == 15))
166+ then if (if ((bet == 51))
167+ then true
168+ else (bet == 54))
169+ then true
170+ else (bet == 77)
171+ else false)
172+ then true
173+ else if (if ((rand == 16))
174+ then if (if ((bet == 52))
175+ then true
176+ else (bet == 55))
177+ then true
178+ else (bet == 90)
179+ else false)
180+ then true
181+ else if (if ((rand == 17))
182+ then if (if (if ((bet == 53))
183+ then true
184+ else (bet == 56))
185+ then true
186+ else (bet == 78))
187+ then true
188+ else (bet == 90)
189+ else false)
190+ then true
191+ else if (if ((rand == 18))
192+ then if (if ((bet == 54))
193+ then true
194+ else (bet == 57))
195+ then true
196+ else (bet == 78)
197+ else false)
198+ then true
199+ else if (if ((rand == 19))
200+ then if (if ((bet == 55))
201+ then true
202+ else (bet == 58))
203+ then true
204+ else (bet == 91)
205+ else false)
206+ then true
207+ else if (if ((rand == 20))
208+ then if (if (if ((bet == 56))
209+ then true
210+ else (bet == 59))
211+ then true
212+ else (bet == 79))
213+ then true
214+ else (bet == 91)
215+ else false)
216+ then true
217+ else if (if ((rand == 21))
218+ then if (if ((bet == 57))
219+ then true
220+ else (bet == 60))
221+ then true
222+ else (bet == 79)
223+ else false)
224+ then true
225+ else if (if ((rand == 22))
226+ then if (if ((bet == 58))
227+ then true
228+ else (bet == 61))
229+ then true
230+ else (bet == 92)
231+ else false)
232+ then true
233+ else if (if ((rand == 23))
234+ then if (if (if ((bet == 59))
235+ then true
236+ else (bet == 62))
237+ then true
238+ else (bet == 80))
239+ then true
240+ else (bet == 92)
241+ else false)
242+ then true
243+ else if (if ((rand == 24))
244+ then if (if ((bet == 60))
245+ then true
246+ else (bet == 63))
247+ then true
248+ else (bet == 80)
249+ else false)
250+ then true
251+ else if (if ((rand == 25))
252+ then if (if ((bet == 61))
253+ then true
254+ else (bet == 64))
255+ then true
256+ else (bet == 93)
257+ else false)
258+ then true
259+ else if (if ((rand == 26))
260+ then if (if (if ((bet == 62))
261+ then true
262+ else (bet == 65))
263+ then true
264+ else (bet == 81))
265+ then true
266+ else (bet == 93)
267+ else false)
268+ then true
269+ else if (if ((rand == 27))
270+ then if (if ((bet == 63))
271+ then true
272+ else (bet == 66))
273+ then true
274+ else (bet == 81)
275+ else false)
276+ then true
277+ else if (if ((rand == 28))
278+ then if (if ((bet == 64))
279+ then true
280+ else (bet == 67))
281+ then true
282+ else (bet == 94)
283+ else false)
284+ then true
285+ else if (if ((rand == 29))
286+ then if (if (if ((bet == 65))
287+ then true
288+ else (bet == 68))
289+ then true
290+ else (bet == 82))
291+ then true
292+ else (bet == 94)
293+ else false)
294+ then true
295+ else if (if ((rand == 30))
296+ then if (if ((bet == 66))
297+ then true
298+ else (bet == 69))
299+ then true
300+ else (bet == 82)
301+ else false)
302+ then true
303+ else if (if ((rand == 31))
304+ then if (if ((bet == 67))
305+ then true
306+ else (bet == 70))
307+ then true
308+ else (bet == 95)
309+ else false)
310+ then true
311+ else if (if ((rand == 32))
312+ then if (if (if ((bet == 68))
313+ then true
314+ else (bet == 71))
315+ then true
316+ else (bet == 83))
317+ then true
318+ else (bet == 95)
319+ else false)
320+ then true
321+ else if (if ((rand == 33))
322+ then if (if ((bet == 69))
323+ then true
324+ else (bet == 72))
325+ then true
326+ else (bet == 83)
327+ else false)
328+ then true
329+ else if (if ((rand == 34))
330+ then if ((bet == 70))
331+ then true
332+ else (bet == 96)
333+ else false)
334+ then true
335+ else if (if ((rand == 35))
336+ then if (if ((bet == 71))
337+ then true
338+ else (bet == 84))
339+ then true
340+ else (bet == 96)
341+ else false)
342+ then true
343+ else if (if ((rand == 36))
344+ then if ((bet == 72))
345+ then true
346+ else (bet == 84)
347+ else false)
348+ then true
349+ else false
67350
68351
69-func isSplit (num1,num2,direction) = if ((direction == HORIZONTAL))
70- then if (if (if (if (if ((num1 > 0))
71- then (34 > num1)
352+func StreetBet (rand,bet) = if (if ((bet == 97))
353+ then if (if ((rand == 0))
354+ then true
355+ else (rand == 1))
356+ then true
357+ else (rand == 2)
358+ else false)
359+ then true
360+ else if (if ((bet == 98))
361+ then if (if ((rand == 0))
362+ then true
363+ else (rand == 2))
364+ then true
365+ else (rand == 3)
72366 else false)
73367 then true
74- else if ((num1 == 0))
75- then (num2 == 1)
368+ else if (if ((bet == 99))
369+ then if (if ((rand == 1))
370+ then true
371+ else (rand == 2))
372+ then true
373+ else (rand == 3)
76374 else false)
77- then true
78- else if ((num1 == 0))
79- then (num2 == 2)
80- else false)
81- then true
82- else if ((num1 == 0))
83- then (num2 == 3)
84- else false)
85- then true
86- else throw("Invalid split hotizontal move. Game aborted!")
87- else if ((direction == VERTICAL))
88- then if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((num1 == 1))
89375 then true
90- else (num1 == 2))
91- then true
92- else (num1 == 4))
93- then true
94- else (num1 == 5))
95- then true
96- else (num1 == 7))
97- then true
98- else (num1 == 8))
99- then true
100- else (num1 == 10))
101- then true
102- else (num1 == 11))
103- then true
104- else (num1 == 13))
105- then true
106- else (num1 == 14))
107- then true
108- else (num1 == 16))
109- then true
110- else (num1 == 17))
111- then true
112- else (num1 == 19))
113- then true
114- else (num1 == 20))
115- then true
116- else (num1 == 22))
117- then true
118- else (num1 == 23))
119- then true
120- else (num1 == 25))
121- then true
122- else (num1 == 26))
123- then true
124- else (num1 == 28))
125- then true
126- else (num1 == 29))
127- then true
128- else (num1 == 31))
129- then true
130- else (num1 == 32))
131- then true
132- else (num1 == 34))
133- then true
134- else (num1 == 35))
135- then true
136- else throw("Invalid split vertical move. Game aborted!")
137- else throw("Invalid split move. Game aborted!")
376+ else if (if ((bet == 100))
377+ then if (if ((rand == 4))
378+ then true
379+ else (rand == 5))
380+ then true
381+ else (rand == 6)
382+ else false)
383+ then true
384+ else if (if ((bet == 101))
385+ then if (if ((rand == 7))
386+ then true
387+ else (rand == 8))
388+ then true
389+ else (rand == 9)
390+ else false)
391+ then true
392+ else if (if ((bet == 102))
393+ then if (if ((rand == 10))
394+ then true
395+ else (rand == 11))
396+ then true
397+ else (rand == 12)
398+ else false)
399+ then true
400+ else if (if ((bet == 103))
401+ then if (if ((rand == 13))
402+ then true
403+ else (rand == 14))
404+ then true
405+ else (rand == 15)
406+ else false)
407+ then true
408+ else if (if ((bet == 104))
409+ then if (if ((rand == 16))
410+ then true
411+ else (rand == 17))
412+ then true
413+ else (rand == 18)
414+ else false)
415+ then true
416+ else if (if ((bet == 105))
417+ then if (if ((rand == 19))
418+ then true
419+ else (rand == 20))
420+ then true
421+ else (rand == 21)
422+ else false)
423+ then true
424+ else if (if ((bet == 106))
425+ then if (if ((rand == 22))
426+ then true
427+ else (rand == 23))
428+ then true
429+ else (rand == 24)
430+ else false)
431+ then true
432+ else if (if ((bet == 107))
433+ then if (if ((rand == 25))
434+ then true
435+ else (rand == 26))
436+ then true
437+ else (rand == 27)
438+ else false)
439+ then true
440+ else if (if ((bet == 108))
441+ then if (if ((rand == 28))
442+ then true
443+ else (rand == 29))
444+ then true
445+ else (rand == 30)
446+ else false)
447+ then true
448+ else if (if ((bet == 109))
449+ then if (if ((rand == 31))
450+ then true
451+ else (rand == 32))
452+ then true
453+ else (rand == 33)
454+ else false)
455+ then true
456+ else if (if ((bet == 110))
457+ then if (if ((rand == 34))
458+ then true
459+ else (rand == 35))
460+ then true
461+ else (rand == 36)
462+ else false)
463+ then true
464+ else false
138465
139466
140-func isStreet (num1,num2) = if (if (if (if (if (if (if (if (if (if (if (if (if (if ((num1 == 1))
467+func CornerBet (rand,bet) = if (if ((bet == 111))
468+ then if (if (if ((rand == 0))
469+ then true
470+ else (rand == 1))
471+ then true
472+ else (rand == 2))
473+ then true
474+ else (rand == 3)
475+ else false)
141476 then true
142- else (num1 == 4))
143- then true
144- else (num1 == 7))
145- then true
146- else (num1 == 10))
147- then true
148- else (num1 == 13))
149- then true
150- else (num1 == 16))
151- then true
152- else (num1 == 19))
153- then true
154- else (num1 == 22))
155- then true
156- else (num1 == 25))
157- then true
158- else (num1 == 28))
159- then true
160- else (num1 == 31))
161- then true
162- else (num1 == 34))
163- then true
164- else if ((num1 == 0))
165- then (num2 == 1)
477+ else if (if ((bet == 112))
478+ then if (if (if ((rand == 1))
479+ then true
480+ else (rand == 2))
481+ then true
482+ else (rand == 4))
483+ then true
484+ else (rand == 5)
166485 else false)
167- then true
168- else if ((num1 == 0))
169- then (num2 == 3)
170- else false)
171- then true
172- else throw("Invalid street move. Game aborted!")
486+ then true
487+ else if (if ((bet == 113))
488+ then if (if (if ((rand == 2))
489+ then true
490+ else (rand == 3))
491+ then true
492+ else (rand == 5))
493+ then true
494+ else (rand == 6)
495+ else false)
496+ then true
497+ else if (if ((bet == 114))
498+ then if (if (if ((rand == 4))
499+ then true
500+ else (rand == 5))
501+ then true
502+ else (rand == 7))
503+ then true
504+ else (rand == 8)
505+ else false)
506+ then true
507+ else if (if ((bet == 115))
508+ then if (if (if ((rand == 5))
509+ then true
510+ else (rand == 6))
511+ then true
512+ else (rand == 8))
513+ then true
514+ else (rand == 9)
515+ else false)
516+ then true
517+ else if (if ((bet == 116))
518+ then if (if (if ((rand == 7))
519+ then true
520+ else (rand == 8))
521+ then true
522+ else (rand == 10))
523+ then true
524+ else (rand == 11)
525+ else false)
526+ then true
527+ else if (if ((bet == 117))
528+ then if (if (if ((rand == 8))
529+ then true
530+ else (rand == 9))
531+ then true
532+ else (rand == 11))
533+ then true
534+ else (rand == 12)
535+ else false)
536+ then true
537+ else if (if ((bet == 118))
538+ then if (if (if ((rand == 10))
539+ then true
540+ else (rand == 11))
541+ then true
542+ else (rand == 13))
543+ then true
544+ else (rand == 14)
545+ else false)
546+ then true
547+ else if (if ((bet == 119))
548+ then if (if (if ((rand == 11))
549+ then true
550+ else (rand == 12))
551+ then true
552+ else (rand == 14))
553+ then true
554+ else (rand == 15)
555+ else false)
556+ then true
557+ else if (if ((bet == 120))
558+ then if (if (if ((rand == 13))
559+ then true
560+ else (rand == 14))
561+ then true
562+ else (rand == 16))
563+ then true
564+ else (rand == 17)
565+ else false)
566+ then true
567+ else if (if ((bet == 121))
568+ then if (if (if ((rand == 14))
569+ then true
570+ else (rand == 15))
571+ then true
572+ else (rand == 17))
573+ then true
574+ else (rand == 18)
575+ else false)
576+ then true
577+ else if (if ((bet == 122))
578+ then if (if (if ((rand == 16))
579+ then true
580+ else (rand == 17))
581+ then true
582+ else (rand == 19))
583+ then true
584+ else (rand == 20)
585+ else false)
586+ then true
587+ else if (if ((bet == 123))
588+ then if (if (if ((rand == 17))
589+ then true
590+ else (rand == 18))
591+ then true
592+ else (rand == 20))
593+ then true
594+ else (rand == 21)
595+ else false)
596+ then true
597+ else if (if ((bet == 124))
598+ then if (if (if ((rand == 19))
599+ then true
600+ else (rand == 20))
601+ then true
602+ else (rand == 22))
603+ then true
604+ else (rand == 23)
605+ else false)
606+ then true
607+ else if (if ((bet == 125))
608+ then if (if (if ((rand == 20))
609+ then true
610+ else (rand == 21))
611+ then true
612+ else (rand == 23))
613+ then true
614+ else (rand == 24)
615+ else false)
616+ then true
617+ else if (if ((bet == 126))
618+ then if (if (if ((rand == 22))
619+ then true
620+ else (rand == 23))
621+ then true
622+ else (rand == 25))
623+ then true
624+ else (rand == 26)
625+ else false)
626+ then true
627+ else if (if ((bet == 127))
628+ then if (if (if ((rand == 23))
629+ then true
630+ else (rand == 24))
631+ then true
632+ else (rand == 26))
633+ then true
634+ else (rand == 27)
635+ else false)
636+ then true
637+ else if (if ((bet == 128))
638+ then if (if (if ((rand == 25))
639+ then true
640+ else (rand == 26))
641+ then true
642+ else (rand == 28))
643+ then true
644+ else (rand == 29)
645+ else false)
646+ then true
647+ else if (if ((bet == 129))
648+ then if (if (if ((rand == 26))
649+ then true
650+ else (rand == 27))
651+ then true
652+ else (rand == 29))
653+ then true
654+ else (rand == 30)
655+ else false)
656+ then true
657+ else if (if ((bet == 130))
658+ then if (if (if ((rand == 28))
659+ then true
660+ else (rand == 29))
661+ then true
662+ else (rand == 31))
663+ then true
664+ else (rand == 32)
665+ else false)
666+ then true
667+ else if (if ((bet == 131))
668+ then if (if (if ((rand == 29))
669+ then true
670+ else (rand == 30))
671+ then true
672+ else (rand == 32))
673+ then true
674+ else (rand == 33)
675+ else false)
676+ then true
677+ else if (if ((bet == 132))
678+ then if (if (if ((rand == 31))
679+ then true
680+ else (rand == 32))
681+ then true
682+ else (rand == 34))
683+ then true
684+ else (rand == 35)
685+ else false)
686+ then true
687+ else if (if ((bet == 133))
688+ then if (if (if ((rand == 32))
689+ then true
690+ else (rand == 33))
691+ then true
692+ else (rand == 35))
693+ then true
694+ else (rand == 36)
695+ else false)
696+ then true
697+ else false
173698
174699
175-func isCorner (num1,num2) = if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((num1 == 1))
700+func LineBet (rand,bet) = if (if (if ((bet == 134))
701+ then (rand >= 1)
702+ else false)
703+ then (6 >= rand)
704+ else false)
176705 then true
177- else (num1 == 2))
178- then true
179- else (num1 == 4))
180- then true
181- else (num1 == 5))
182- then true
183- else (num1 == 7))
184- then true
185- else (num1 == 8))
186- then true
187- else (num1 == 10))
188- then true
189- else (num1 == 11))
190- then true
191- else (num1 == 13))
192- then true
193- else (num1 == 14))
194- then true
195- else (num1 == 16))
196- then true
197- else (num1 == 17))
198- then true
199- else (num1 == 19))
200- then true
201- else (num1 == 20))
202- then true
203- else (num1 == 22))
204- then true
205- else (num1 == 23))
206- then true
207- else (num1 == 25))
208- then true
209- else (num1 == 26))
210- then true
211- else (num1 == 28))
212- then true
213- else (num1 == 29))
214- then true
215- else (num1 == 31))
216- then true
217- else (num1 == 32))
218- then true
219- else if ((num1 == 0))
220- then (num2 == 1)
706+ else if (if (if ((bet == 135))
707+ then (rand >= 4)
221708 else false)
222- then true
223- else throw("Invalid corner move. Game aborted!")
709+ then (9 >= rand)
710+ else false)
711+ then true
712+ else if (if (if ((bet == 136))
713+ then (rand >= 7)
714+ else false)
715+ then (12 >= rand)
716+ else false)
717+ then true
718+ else if (if (if ((bet == 137))
719+ then (rand >= 10)
720+ else false)
721+ then (15 >= rand)
722+ else false)
723+ then true
724+ else if (if (if ((bet == 138))
725+ then (rand >= 13)
726+ else false)
727+ then (18 >= rand)
728+ else false)
729+ then true
730+ else if (if (if ((bet == 139))
731+ then (rand >= 16)
732+ else false)
733+ then (21 >= rand)
734+ else false)
735+ then true
736+ else if (if (if ((bet == 140))
737+ then (rand >= 19)
738+ else false)
739+ then (24 >= rand)
740+ else false)
741+ then true
742+ else if (if (if ((bet == 141))
743+ then (rand >= 22)
744+ else false)
745+ then (27 >= rand)
746+ else false)
747+ then true
748+ else if (if (if ((bet == 142))
749+ then (rand >= 25)
750+ else false)
751+ then (30 >= rand)
752+ else false)
753+ then true
754+ else if (if (if ((bet == 143))
755+ then (rand >= 28)
756+ else false)
757+ then (33 >= rand)
758+ else false)
759+ then true
760+ else if (if (if ((bet == 144))
761+ then (rand >= 31)
762+ else false)
763+ then (36 >= rand)
764+ else false)
765+ then true
766+ else false
224767
225768
226-func isLine (num) = if (if (if (if (if (if (if (if (if (if (if ((num == 1))
769+func ColumnBet (rand,bet) = if (if ((bet == 145))
770+ then if (if (if (if (if (if (if (if (if (if (if (if ((rand == 0))
771+ then true
772+ else (rand == 1))
773+ then true
774+ else (rand == 4))
775+ then true
776+ else (rand == 7))
777+ then true
778+ else (rand == 10))
779+ then true
780+ else (rand == 13))
781+ then true
782+ else (rand == 16))
783+ then true
784+ else (rand == 19))
785+ then true
786+ else (rand == 22))
787+ then true
788+ else (rand == 25))
789+ then true
790+ else (rand == 28))
791+ then true
792+ else (rand == 31))
793+ then true
794+ else (rand == 34)
795+ else false)
227796 then true
228- else (num == 4))
229- then true
230- else (num == 7))
231- then true
232- else (num == 10))
233- then true
234- else (num == 13))
235- then true
236- else (num == 16))
237- then true
238- else (num == 19))
239- then true
240- else (num == 22))
241- then true
242- else (num == 25))
243- then true
244- else (num == 28))
245- then true
246- else (num == 31))
247- then true
248- else throw("Invalid line move. Game aborted!")
797+ else if (if ((bet == 146))
798+ then if (if (if (if (if (if (if (if (if (if (if (if ((rand == 0))
799+ then true
800+ else (rand == 2))
801+ then true
802+ else (rand == 5))
803+ then true
804+ else (rand == 8))
805+ then true
806+ else (rand == 11))
807+ then true
808+ else (rand == 14))
809+ then true
810+ else (rand == 17))
811+ then true
812+ else (rand == 20))
813+ then true
814+ else (rand == 23))
815+ then true
816+ else (rand == 26))
817+ then true
818+ else (rand == 29))
819+ then true
820+ else (rand == 32))
821+ then true
822+ else (rand == 35)
823+ else false)
824+ then true
825+ else if (if ((bet == 147))
826+ then if (if (if (if (if (if (if (if (if (if (if (if ((rand == 0))
827+ then true
828+ else (rand == 3))
829+ then true
830+ else (rand == 6))
831+ then true
832+ else (rand == 9))
833+ then true
834+ else (rand == 12))
835+ then true
836+ else (rand == 15))
837+ then true
838+ else (rand == 18))
839+ then true
840+ else (rand == 21))
841+ then true
842+ else (rand == 24))
843+ then true
844+ else (rand == 27))
845+ then true
846+ else (rand == 30))
847+ then true
848+ else (rand == 33))
849+ then true
850+ else (rand == 36)
851+ else false)
852+ then true
853+ else false
249854
250855
251-func isColumn (column) = if (if (if ((column == 1))
856+func DozenBet (rand,bet) = if (if (if ((bet == 148))
857+ then (rand >= 1)
858+ else false)
859+ then (12 >= rand)
860+ else false)
252861 then true
253- else (column == 2))
254- then true
255- else (column == 3))
256- then true
257- else throw("Invalid column move. Game aborted!")
862+ else if (if (if ((bet == 149))
863+ then (rand >= 13)
864+ else false)
865+ then (24 >= rand)
866+ else false)
867+ then true
868+ else if (if (if ((bet == 150))
869+ then (rand >= 25)
870+ else false)
871+ then (36 >= rand)
872+ else false)
873+ then true
874+ else false
258875
259876
260-func isDozen (dozen) = if (if (if ((dozen == 1))
877+func ColorBet (rand,bet) = if (if ((bet == 151))
878+ then if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((rand == 1))
879+ then true
880+ else (rand == 3))
881+ then true
882+ else (rand == 5))
883+ then true
884+ else (rand == 7))
885+ then true
886+ else (rand == 9))
887+ then true
888+ else (rand == 12))
889+ then true
890+ else (rand == 14))
891+ then true
892+ else (rand == 16))
893+ then true
894+ else (rand == 18))
895+ then true
896+ else (rand == 19))
897+ then true
898+ else (rand == 21))
899+ then true
900+ else (rand == 23))
901+ then true
902+ else (rand == 25))
903+ then true
904+ else (rand == 27))
905+ then true
906+ else (rand == 30))
907+ then true
908+ else (rand == 32))
909+ then true
910+ else (rand == 34))
911+ then true
912+ else (rand == 36)
913+ else false)
261914 then true
262- else (dozen == 2))
263- then true
264- else (dozen == 3))
265- then true
266- else throw("Invalid dozen move. Game aborted!")
915+ else if (if ((bet == 152))
916+ then if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((rand == 2))
917+ then true
918+ else (rand == 4))
919+ then true
920+ else (rand == 6))
921+ then true
922+ else (rand == 8))
923+ then true
924+ else (rand == 10))
925+ then true
926+ else (rand == 11))
927+ then true
928+ else (rand == 13))
929+ then true
930+ else (rand == 15))
931+ then true
932+ else (rand == 17))
933+ then true
934+ else (rand == 20))
935+ then true
936+ else (rand == 22))
937+ then true
938+ else (rand == 24))
939+ then true
940+ else (rand == 26))
941+ then true
942+ else (rand == 28))
943+ then true
944+ else (rand == 29))
945+ then true
946+ else (rand == 31))
947+ then true
948+ else (rand == 33))
949+ then true
950+ else (rand == 35)
951+ else false)
952+ then true
953+ else false
267954
268955
269-func validateBetAndGetAmt (bet) = if ((size(bet) != 0))
270- then {
271- let betContents = split(bet, "_")
272- if ((size(betContents) == 5))
273- then {
274- let betType = parseInt(betContents[0])
275- let betAmount = parseIntValue(betContents[1])
276- let betNum1 = parseIntValue(betContents[2])
277- let betNum2 = parseIntValue(betContents[3])
278- let betNum3 = parseIntValue(betContents[4])
279- if (is0to36(betNum1))
280- then if ((betType == TSTRAIGHT))
281- then betAmount
282- else if ((betType == TSPLIT))
283- then if (isSplit(betNum1, betNum2, betNum3))
284- then betAmount
285- else 0
286- else if ((betType == TSTREET))
287- then if (isStreet(betNum1, betNum2))
288- then betAmount
289- else 0
290- else if ((betType == TCOLUMN))
291- then if (isCorner(betNum1, betNum2))
292- then betAmount
293- else 0
294- else if ((betType == TLINE))
295- then if (isLine(betNum1))
296- then betAmount
297- else 0
298- else if ((betType == TCOLUMN))
299- then if (isColumn(betNum1))
300- then betAmount
301- else 0
302- else if ((betType == TDOZEN))
303- then if (isDozen(betNum1))
304- then betAmount
305- else 0
306- else if ((betType == TRED))
307- then betAmount
308- else if ((betType == TBLACK))
309- then betAmount
310- else if ((betType == TODD))
311- then betAmount
312- else if ((betType == TEVEN))
313- then betAmount
314- else if ((betType == T1TO18))
315- then betAmount
316- else if ((betType == T19TO36))
317- then betAmount
318- else throw("Invalid bet type, Game aborted!")
319- else throw("Invalid bet range, Game aborted!")
320- }
321- else throw("Invalid bet structure, Game aborted!")
322- }
323- else 0
324-
325-
326-func getBetsAmt (bets) = {
327- let s = size(bets)
328- (validateBetAndGetAmt(if ((s >= 1))
329- then bets[0]
330- else "") + validateBetAndGetAmt(if ((s >= 2))
331- then bets[1]
332- else ""))
956+func EvenOddBet (rand,bet) = {
957+ let rem = (rand % 2)
958+ if (if (if ((rand > 0))
959+ then (bet == 153)
960+ else false)
961+ then (rem == 0)
962+ else false)
963+ then true
964+ else if (if (if ((rand > 0))
965+ then (bet == 154)
966+ else false)
967+ then (rem != 0)
968+ else false)
969+ then true
970+ else false
333971 }
334972
335973
336-func IncrementGameNum () = {
337- let gameNum = match getInteger(this, GAMESCOUNTERKEY) {
974+func LowHighBet (rand,bet) = if (if (if ((bet == 155))
975+ then (rand >= 1)
976+ else false)
977+ then (18 >= rand)
978+ else false)
979+ then true
980+ else if (if (if ((bet == 156))
981+ then (rand >= 19)
982+ else false)
983+ then (36 >= rand)
984+ else false)
985+ then true
986+ else false
987+
988+
989+func RouletteWin (rand,bet) = if (if ((bet >= 0))
990+ then (36 >= bet)
991+ else false)
992+ then StraightUpBet(rand, bet)
993+ else if (if ((bet >= 37))
994+ then (96 >= bet)
995+ else false)
996+ then SplitBet(rand, bet)
997+ else if (if ((bet >= 97))
998+ then (110 >= bet)
999+ else false)
1000+ then StreetBet(rand, bet)
1001+ else if (if ((bet >= 111))
1002+ then (133 >= bet)
1003+ else false)
1004+ then CornerBet(rand, bet)
1005+ else if (if ((bet >= 134))
1006+ then (144 >= bet)
1007+ else false)
1008+ then LineBet(rand, bet)
1009+ else if (if ((bet >= 145))
1010+ then (147 >= bet)
1011+ else false)
1012+ then ColumnBet(rand, bet)
1013+ else if (if ((bet >= 148))
1014+ then (150 >= bet)
1015+ else false)
1016+ then DozenBet(rand, bet)
1017+ else if (if ((bet == 151))
1018+ then true
1019+ else (bet == 152))
1020+ then ColorBet(rand, bet)
1021+ else if (if ((bet == 153))
1022+ then true
1023+ else (bet == 154))
1024+ then EvenOddBet(rand, bet)
1025+ else if (if ((bet == 155))
1026+ then true
1027+ else (bet == 156))
1028+ then LowHighBet(rand, bet)
1029+ else throw("Random randber out of range, 0 <= rand <= 36")
1030+
1031+
1032+func Multiplier (bet) = if (if ((bet >= 0))
1033+ then (36 >= bet)
1034+ else false)
1035+ then 36
1036+ else if (if ((bet >= 37))
1037+ then (96 >= bet)
1038+ else false)
1039+ then 18
1040+ else if (if ((bet >= 97))
1041+ then (110 >= bet)
1042+ else false)
1043+ then 12
1044+ else if (if ((bet >= 111))
1045+ then (133 >= bet)
1046+ else false)
1047+ then 9
1048+ else if (if ((bet >= 134))
1049+ then (144 >= bet)
1050+ else false)
1051+ then 6
1052+ else if (if ((bet >= 145))
1053+ then (147 >= bet)
1054+ else false)
1055+ then 3
1056+ else if (if ((bet >= 148))
1057+ then (150 >= bet)
1058+ else false)
1059+ then 3
1060+ else if (if ((bet == 151))
1061+ then true
1062+ else (bet == 152))
1063+ then 2
1064+ else if (if ((bet == 153))
1065+ then true
1066+ else (bet == 154))
1067+ then 2
1068+ else if (if ((bet == 155))
1069+ then true
1070+ else (bet == 156))
1071+ then 2
1072+ else throw("Bet number out of range, 0 <= rand <= 156")
1073+
1074+
1075+func GetWinAmount (bet,amount) = {
1076+ let multi = Multiplier(bet)
1077+ let fee = fraction(amount, 6, 100)
1078+ ((amount * multi) - fee)
1079+ }
1080+
1081+
1082+func IncrementValue (value) = {
1083+ let provNum = match getInteger(this, value) {
3381084 case num: Int =>
3391085 num
3401086 case _ =>
3411087 0
3421088 }
343- (gameNum + 1)
1089+ (provNum + 1)
3441090 }
3451091
3461092
1093+func ExtractValue (value) = match getInteger(this, value) {
1094+ case a: Int =>
1095+ a
1096+ case _ =>
1097+ 0
1098+}
1099+
1100+
1101+func ValidateAndIncreaseReservedAmt (winAmt) = {
1102+ let newReservedAmount = (ExtractValue(RESERVATIONKEY) + winAmt)
1103+ let balance = assetBalance(this, WBET)
1104+ if ((newReservedAmount > balance))
1105+ then throw("Insufficient funds on Wavesbet Roulette account. Transaction was rejected for your safety.")
1106+ else newReservedAmount
1107+ }
1108+
1109+
1110+func DecreaseReservedAmt (winAmt) = {
1111+ let newReservedAmount = (ExtractValue(RESERVATIONKEY) - winAmt)
1112+ if ((0 > newReservedAmount))
1113+ then throw("Invalid roulette account state - reserved amount is less than 0")
1114+ else DataEntry(RESERVATIONKEY, newReservedAmount)
1115+ }
1116+
1117+
1118+func GenerateRandInt (gameId,rsaSign) = {
1119+ let rsaSigValid = rsaVerify(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC)
1120+ if (rsaSigValid)
1121+ then {
1122+ let rand = (toInt(sha256(rsaSign)) % 36)
1123+ if ((0 > rand))
1124+ then ((-1 * rand) + 1)
1125+ else (rand + 1)
1126+ }
1127+ else throw("Invalid RSA signature")
1128+ }
1129+
1130+
1131+func RandToStr (r) = if (if ((r >= 1))
1132+ then (36 >= r)
1133+ else false)
1134+ then toString(r)
1135+ else throw(("Unsupported r parameter passed: expected=[0,...,36] actual=" + toString(r)))
1136+
1137+
1138+func ExtractString (id) = {
1139+ let rawDataStr = match getString(this, id) {
1140+ case str: String =>
1141+ str
1142+ case _ =>
1143+ throw(("Couldn't find string by " + id))
1144+ }
1145+ rawDataStr
1146+ }
1147+
1148+
1149+func GetGameId (betIdO,betId) = if ((betIdO == "new"))
1150+ then (("game_" + betId) + "_bet_1")
1151+ else {
1152+ let beti = toString(IncrementValue(betIdO))
1153+ ((("game_" + betIdO) + "_bet_") + beti)
1154+ }
1155+
1156+
1157+func GetWriteSet (gameIdO,betId,gameId,winAmt,gameDataStr) = if ((gameIdO == "new"))
1158+ then WriteSet([DataEntry(GAMESCOUNTERKEY, IncrementValue(GAMESCOUNTERKEY)), DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(betId, 1), DataEntry(gameId, gameDataStr)])
1159+ else WriteSet([DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(gameIdO, IncrementValue(gameIdO)), DataEntry(gameId, gameDataStr)])
1160+
1161+
3471162 @Callable(i)
348-func playRoulette (bets) = {
349- let betList = split(bets, "|")
350- let t = getBetsAmt(betList)
351- throw(toString(t))
1163+func playRoulette (bet,gameIdO) = {
1164+ let betId = toBase58String(i.transactionId)
1165+ let payment = extract(i.payment)
1166+ let feeAssetId = isDefined(i.feeAssetId)
1167+ let playerBalance = wavesBalance(i.caller)
1168+ let gameId = GetGameId(gameIdO, betId)
1169+ let gameIdUsed = isDefined(getString(this, gameId))
1170+ let winAmt = GetWinAmount(bet, payment.amount)
1171+ if ((payment.assetId != WBET))
1172+ then throw("Payment should be in Wavesbet")
1173+ else if ((1000000 > playerBalance))
1174+ then throw("There are not enough waves, it takes 0.01 Waves to bet. Game aborted.")
1175+ else if (feeAssetId)
1176+ then throw("Transaction's fee must be in Waves. Game aborted.")
1177+ else if (gameIdUsed)
1178+ then throw("Passed gameId had been used before. Game aborted.")
1179+ else {
1180+ let playerPubKey58 = toBase58String(i.callerPublicKey)
1181+ let gameDataStr = (((((("SUBMITTED" + "_") + toString(bet)) + "_") + playerPubKey58) + "_") + toString(winAmt))
1182+ ScriptResult(GetWriteSet(gameIdO, betId, gameId, winAmt, gameDataStr), TransferSet([ScriptTransfer(WALLETCOMMUNITY, fraction(payment.amount, FEECOMMUNITY, 100), WBET), ScriptTransfer(WALLETWAVESBET, fraction(payment.amount, FEEWAVESBET, 100), WBET), ScriptTransfer(WALLETMCAFEE, fraction(payment.amount, FEEMCAFEE, 100), WBET)]))
1183+ }
1184+ }
1185+
1186+
1187+
1188+@Callable(i)
1189+func withdraw (gameId,rsaSig) = {
1190+ let gameDataList = split(ExtractString(gameId), "_")
1191+ let gameState = gameDataList[0]
1192+ let bet = parseIntValue(gameDataList[1])
1193+ let playerPubKey58 = gameDataList[2]
1194+ let winAmt = parseIntValue(gameDataList[3])
1195+ let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
1196+ let decreasedReserves = DecreaseReservedAmt(winAmt)
1197+ if ((gameState != "SUBMITTED"))
1198+ then throw("Invalid game state for passed gameId. Game aborted. ")
1199+ else {
1200+ let gameDataString = split(gameId, "_")
1201+ let rand = GenerateRandInt(gameDataString[1], rsaSig)
1202+ let randStr = RandToStr(rand)
1203+ if (RouletteWin(rand, bet))
1204+ then {
1205+ let newGameDataStr = (((((((("WON" + "_") + gameDataList[1]) + "_") + playerPubKey58) + "_") + gameDataList[3]) + "_") + randStr)
1206+ ScriptResult(WriteSet([DataEntry(gameId, newGameDataStr), decreasedReserves]), TransferSet([ScriptTransfer(playerAddress, winAmt, WBET)]))
1207+ }
1208+ else {
1209+ let newGameDataStr = (((((((("LOST" + "_") + gameDataList[1]) + "_") + playerPubKey58) + "_") + gameDataList[3]) + "_") + randStr)
1210+ WriteSet([DataEntry(gameId, newGameDataStr), decreasedReserves])
1211+ }
1212+ }
3521213 }
3531214
3541215
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAg4dAR6XbBDAS9hr/Ej3dJv6Ffc466x/mOGMWU3lrABs3qa8BHmuJGnkfbpEf2vAwYTOWPvvzfM10OBbfloSyq3c9MKvyTe1luBLGqW4vZUXIyvSgz1liyUVefIQy3dyF9jbeTZbC0bbcT/7O3DEL+01z6A+rDCacSZ0lGolSQ6AnhLxzIkVpOQJbrBmC+x+ZuZPCMWzJynd5aeOn7jaj/mkRVyxe6g/0OhWz4NiiZXeuMRB+8mKy0fWD/UlIlZWHsAS2ZmrkXKqjLq0/0wr8ILJkznjSqdnI5Ibjg3uQrj/4AN+i9r28aQ73/ZkPtY5Sbw0AOiABBu7gHmq9ayVxZQIDAQAB")
55
66 let GAMESCOUNTERKEY = "$GAME_NUM"
77
88 let RESERVATIONKEY = "$RESERVED_AMOUNT"
99
1010 let WBET = base58'A4q1mYKo11yuH9gmvDodeJoksagcyQzeFE9JtphMWddw'
1111
12-let WALLETWAVESBET = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8')
12+let WALLETCOMMUNITY = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8')
1313
14-let WALLETMCAFEE = Address(base58'3MtCy2PCFPyu8A9SRNL4qUo1V17SGLHftD8')
14+let WALLETWAVESBET = Address(base58'3MxK12u62zsu9xh3hU7p5iJncCLANd3zhTZ')
15+
16+let WALLETMCAFEE = Address(base58'3MxK12u62zsu9xh3hU7p5iJncCLANd3zhTZ')
1517
1618 let WAVELET = 100000000
1719
18-let FEEWAVESBET = 4
20+let FEECOMMUNITY = 1
21+
22+let FEEWAVESBET = 3
1923
2024 let FEEMCAFEE = 2
21-
22-let STATESUBMITTED = "SUBMITTED"
23-
24-let STATEWON = "WON"
25-
26-let STATELOST = "LOST"
2725
2826 let BETMIN = (1 * WAVELET)
2927
3028 let BETMAX = (20000000 * WAVELET)
3129
32-let TSTRAIGHT = 1
30+func StraightUpBet (rand,bet) = if ((rand == bet))
31+ then true
32+ else false
3333
34-let TSPLIT = 2
3534
36-let TSTREET = 3
37-
38-let TCORNER = 4
39-
40-let TLINE = 5
41-
42-let TCOLUMN = 6
43-
44-let TDOZEN = 7
45-
46-let TRED = 8
47-
48-let TBLACK = 9
49-
50-let TODD = 10
51-
52-let TEVEN = 11
53-
54-let T1TO18 = 12
55-
56-let T19TO36 = 13
57-
58-let HORIZONTAL = 1
59-
60-let VERTICAL = 2
61-
62-func is0to36 (num) = if (if ((num >= 0))
63- then (37 > num)
35+func SplitBet (rand,bet) = if (if ((rand == 0))
36+ then if (if ((bet == 37))
37+ then true
38+ else (bet == 38))
39+ then true
40+ else (bet == 39)
6441 else false)
6542 then true
66- else throw("Invalid range, try between 0 and 36. Game aborted!")
43+ else if (if ((rand == 1))
44+ then if (if ((bet == 37))
45+ then true
46+ else (bet == 40))
47+ then true
48+ else (bet == 85)
49+ else false)
50+ then true
51+ else if (if ((rand == 2))
52+ then if (if (if ((bet == 38))
53+ then true
54+ else (bet == 41))
55+ then true
56+ else (bet == 73))
57+ then true
58+ else (bet == 85)
59+ else false)
60+ then true
61+ else if (if ((rand == 3))
62+ then if (if ((bet == 39))
63+ then true
64+ else (bet == 42))
65+ then true
66+ else (bet == 73)
67+ else false)
68+ then true
69+ else if (if ((rand == 4))
70+ then if (if ((bet == 40))
71+ then true
72+ else (bet == 43))
73+ then true
74+ else (bet == 86)
75+ else false)
76+ then true
77+ else if (if ((rand == 5))
78+ then if (if (if ((bet == 41))
79+ then true
80+ else (bet == 44))
81+ then true
82+ else (bet == 74))
83+ then true
84+ else (bet == 86)
85+ else false)
86+ then true
87+ else if (if ((rand == 6))
88+ then if (if ((bet == 42))
89+ then true
90+ else (bet == 45))
91+ then true
92+ else (bet == 74)
93+ else false)
94+ then true
95+ else if (if ((rand == 7))
96+ then if (if ((bet == 43))
97+ then true
98+ else (bet == 46))
99+ then true
100+ else (bet == 87)
101+ else false)
102+ then true
103+ else if (if ((rand == 8))
104+ then if (if (if ((bet == 44))
105+ then true
106+ else (bet == 47))
107+ then true
108+ else (bet == 75))
109+ then true
110+ else (bet == 87)
111+ else false)
112+ then true
113+ else if (if ((rand == 9))
114+ then if (if ((bet == 45))
115+ then true
116+ else (bet == 48))
117+ then true
118+ else (bet == 75)
119+ else false)
120+ then true
121+ else if (if ((rand == 10))
122+ then if (if ((bet == 46))
123+ then true
124+ else (bet == 49))
125+ then true
126+ else (bet == 88)
127+ else false)
128+ then true
129+ else if (if ((rand == 11))
130+ then if (if (if ((bet == 47))
131+ then true
132+ else (bet == 50))
133+ then true
134+ else (bet == 76))
135+ then true
136+ else (bet == 88)
137+ else false)
138+ then true
139+ else if (if ((rand == 12))
140+ then if (if ((bet == 48))
141+ then true
142+ else (bet == 51))
143+ then true
144+ else (bet == 76)
145+ else false)
146+ then true
147+ else if (if ((rand == 13))
148+ then if (if ((bet == 49))
149+ then true
150+ else (bet == 52))
151+ then true
152+ else (bet == 89)
153+ else false)
154+ then true
155+ else if (if ((rand == 14))
156+ then if (if (if ((bet == 50))
157+ then true
158+ else (bet == 53))
159+ then true
160+ else (bet == 77))
161+ then true
162+ else (bet == 89)
163+ else false)
164+ then true
165+ else if (if ((rand == 15))
166+ then if (if ((bet == 51))
167+ then true
168+ else (bet == 54))
169+ then true
170+ else (bet == 77)
171+ else false)
172+ then true
173+ else if (if ((rand == 16))
174+ then if (if ((bet == 52))
175+ then true
176+ else (bet == 55))
177+ then true
178+ else (bet == 90)
179+ else false)
180+ then true
181+ else if (if ((rand == 17))
182+ then if (if (if ((bet == 53))
183+ then true
184+ else (bet == 56))
185+ then true
186+ else (bet == 78))
187+ then true
188+ else (bet == 90)
189+ else false)
190+ then true
191+ else if (if ((rand == 18))
192+ then if (if ((bet == 54))
193+ then true
194+ else (bet == 57))
195+ then true
196+ else (bet == 78)
197+ else false)
198+ then true
199+ else if (if ((rand == 19))
200+ then if (if ((bet == 55))
201+ then true
202+ else (bet == 58))
203+ then true
204+ else (bet == 91)
205+ else false)
206+ then true
207+ else if (if ((rand == 20))
208+ then if (if (if ((bet == 56))
209+ then true
210+ else (bet == 59))
211+ then true
212+ else (bet == 79))
213+ then true
214+ else (bet == 91)
215+ else false)
216+ then true
217+ else if (if ((rand == 21))
218+ then if (if ((bet == 57))
219+ then true
220+ else (bet == 60))
221+ then true
222+ else (bet == 79)
223+ else false)
224+ then true
225+ else if (if ((rand == 22))
226+ then if (if ((bet == 58))
227+ then true
228+ else (bet == 61))
229+ then true
230+ else (bet == 92)
231+ else false)
232+ then true
233+ else if (if ((rand == 23))
234+ then if (if (if ((bet == 59))
235+ then true
236+ else (bet == 62))
237+ then true
238+ else (bet == 80))
239+ then true
240+ else (bet == 92)
241+ else false)
242+ then true
243+ else if (if ((rand == 24))
244+ then if (if ((bet == 60))
245+ then true
246+ else (bet == 63))
247+ then true
248+ else (bet == 80)
249+ else false)
250+ then true
251+ else if (if ((rand == 25))
252+ then if (if ((bet == 61))
253+ then true
254+ else (bet == 64))
255+ then true
256+ else (bet == 93)
257+ else false)
258+ then true
259+ else if (if ((rand == 26))
260+ then if (if (if ((bet == 62))
261+ then true
262+ else (bet == 65))
263+ then true
264+ else (bet == 81))
265+ then true
266+ else (bet == 93)
267+ else false)
268+ then true
269+ else if (if ((rand == 27))
270+ then if (if ((bet == 63))
271+ then true
272+ else (bet == 66))
273+ then true
274+ else (bet == 81)
275+ else false)
276+ then true
277+ else if (if ((rand == 28))
278+ then if (if ((bet == 64))
279+ then true
280+ else (bet == 67))
281+ then true
282+ else (bet == 94)
283+ else false)
284+ then true
285+ else if (if ((rand == 29))
286+ then if (if (if ((bet == 65))
287+ then true
288+ else (bet == 68))
289+ then true
290+ else (bet == 82))
291+ then true
292+ else (bet == 94)
293+ else false)
294+ then true
295+ else if (if ((rand == 30))
296+ then if (if ((bet == 66))
297+ then true
298+ else (bet == 69))
299+ then true
300+ else (bet == 82)
301+ else false)
302+ then true
303+ else if (if ((rand == 31))
304+ then if (if ((bet == 67))
305+ then true
306+ else (bet == 70))
307+ then true
308+ else (bet == 95)
309+ else false)
310+ then true
311+ else if (if ((rand == 32))
312+ then if (if (if ((bet == 68))
313+ then true
314+ else (bet == 71))
315+ then true
316+ else (bet == 83))
317+ then true
318+ else (bet == 95)
319+ else false)
320+ then true
321+ else if (if ((rand == 33))
322+ then if (if ((bet == 69))
323+ then true
324+ else (bet == 72))
325+ then true
326+ else (bet == 83)
327+ else false)
328+ then true
329+ else if (if ((rand == 34))
330+ then if ((bet == 70))
331+ then true
332+ else (bet == 96)
333+ else false)
334+ then true
335+ else if (if ((rand == 35))
336+ then if (if ((bet == 71))
337+ then true
338+ else (bet == 84))
339+ then true
340+ else (bet == 96)
341+ else false)
342+ then true
343+ else if (if ((rand == 36))
344+ then if ((bet == 72))
345+ then true
346+ else (bet == 84)
347+ else false)
348+ then true
349+ else false
67350
68351
69-func isSplit (num1,num2,direction) = if ((direction == HORIZONTAL))
70- then if (if (if (if (if ((num1 > 0))
71- then (34 > num1)
352+func StreetBet (rand,bet) = if (if ((bet == 97))
353+ then if (if ((rand == 0))
354+ then true
355+ else (rand == 1))
356+ then true
357+ else (rand == 2)
358+ else false)
359+ then true
360+ else if (if ((bet == 98))
361+ then if (if ((rand == 0))
362+ then true
363+ else (rand == 2))
364+ then true
365+ else (rand == 3)
72366 else false)
73367 then true
74- else if ((num1 == 0))
75- then (num2 == 1)
368+ else if (if ((bet == 99))
369+ then if (if ((rand == 1))
370+ then true
371+ else (rand == 2))
372+ then true
373+ else (rand == 3)
76374 else false)
77- then true
78- else if ((num1 == 0))
79- then (num2 == 2)
80- else false)
81- then true
82- else if ((num1 == 0))
83- then (num2 == 3)
84- else false)
85- then true
86- else throw("Invalid split hotizontal move. Game aborted!")
87- else if ((direction == VERTICAL))
88- then if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((num1 == 1))
89375 then true
90- else (num1 == 2))
91- then true
92- else (num1 == 4))
93- then true
94- else (num1 == 5))
95- then true
96- else (num1 == 7))
97- then true
98- else (num1 == 8))
99- then true
100- else (num1 == 10))
101- then true
102- else (num1 == 11))
103- then true
104- else (num1 == 13))
105- then true
106- else (num1 == 14))
107- then true
108- else (num1 == 16))
109- then true
110- else (num1 == 17))
111- then true
112- else (num1 == 19))
113- then true
114- else (num1 == 20))
115- then true
116- else (num1 == 22))
117- then true
118- else (num1 == 23))
119- then true
120- else (num1 == 25))
121- then true
122- else (num1 == 26))
123- then true
124- else (num1 == 28))
125- then true
126- else (num1 == 29))
127- then true
128- else (num1 == 31))
129- then true
130- else (num1 == 32))
131- then true
132- else (num1 == 34))
133- then true
134- else (num1 == 35))
135- then true
136- else throw("Invalid split vertical move. Game aborted!")
137- else throw("Invalid split move. Game aborted!")
376+ else if (if ((bet == 100))
377+ then if (if ((rand == 4))
378+ then true
379+ else (rand == 5))
380+ then true
381+ else (rand == 6)
382+ else false)
383+ then true
384+ else if (if ((bet == 101))
385+ then if (if ((rand == 7))
386+ then true
387+ else (rand == 8))
388+ then true
389+ else (rand == 9)
390+ else false)
391+ then true
392+ else if (if ((bet == 102))
393+ then if (if ((rand == 10))
394+ then true
395+ else (rand == 11))
396+ then true
397+ else (rand == 12)
398+ else false)
399+ then true
400+ else if (if ((bet == 103))
401+ then if (if ((rand == 13))
402+ then true
403+ else (rand == 14))
404+ then true
405+ else (rand == 15)
406+ else false)
407+ then true
408+ else if (if ((bet == 104))
409+ then if (if ((rand == 16))
410+ then true
411+ else (rand == 17))
412+ then true
413+ else (rand == 18)
414+ else false)
415+ then true
416+ else if (if ((bet == 105))
417+ then if (if ((rand == 19))
418+ then true
419+ else (rand == 20))
420+ then true
421+ else (rand == 21)
422+ else false)
423+ then true
424+ else if (if ((bet == 106))
425+ then if (if ((rand == 22))
426+ then true
427+ else (rand == 23))
428+ then true
429+ else (rand == 24)
430+ else false)
431+ then true
432+ else if (if ((bet == 107))
433+ then if (if ((rand == 25))
434+ then true
435+ else (rand == 26))
436+ then true
437+ else (rand == 27)
438+ else false)
439+ then true
440+ else if (if ((bet == 108))
441+ then if (if ((rand == 28))
442+ then true
443+ else (rand == 29))
444+ then true
445+ else (rand == 30)
446+ else false)
447+ then true
448+ else if (if ((bet == 109))
449+ then if (if ((rand == 31))
450+ then true
451+ else (rand == 32))
452+ then true
453+ else (rand == 33)
454+ else false)
455+ then true
456+ else if (if ((bet == 110))
457+ then if (if ((rand == 34))
458+ then true
459+ else (rand == 35))
460+ then true
461+ else (rand == 36)
462+ else false)
463+ then true
464+ else false
138465
139466
140-func isStreet (num1,num2) = if (if (if (if (if (if (if (if (if (if (if (if (if (if ((num1 == 1))
467+func CornerBet (rand,bet) = if (if ((bet == 111))
468+ then if (if (if ((rand == 0))
469+ then true
470+ else (rand == 1))
471+ then true
472+ else (rand == 2))
473+ then true
474+ else (rand == 3)
475+ else false)
141476 then true
142- else (num1 == 4))
143- then true
144- else (num1 == 7))
145- then true
146- else (num1 == 10))
147- then true
148- else (num1 == 13))
149- then true
150- else (num1 == 16))
151- then true
152- else (num1 == 19))
153- then true
154- else (num1 == 22))
155- then true
156- else (num1 == 25))
157- then true
158- else (num1 == 28))
159- then true
160- else (num1 == 31))
161- then true
162- else (num1 == 34))
163- then true
164- else if ((num1 == 0))
165- then (num2 == 1)
477+ else if (if ((bet == 112))
478+ then if (if (if ((rand == 1))
479+ then true
480+ else (rand == 2))
481+ then true
482+ else (rand == 4))
483+ then true
484+ else (rand == 5)
166485 else false)
167- then true
168- else if ((num1 == 0))
169- then (num2 == 3)
170- else false)
171- then true
172- else throw("Invalid street move. Game aborted!")
486+ then true
487+ else if (if ((bet == 113))
488+ then if (if (if ((rand == 2))
489+ then true
490+ else (rand == 3))
491+ then true
492+ else (rand == 5))
493+ then true
494+ else (rand == 6)
495+ else false)
496+ then true
497+ else if (if ((bet == 114))
498+ then if (if (if ((rand == 4))
499+ then true
500+ else (rand == 5))
501+ then true
502+ else (rand == 7))
503+ then true
504+ else (rand == 8)
505+ else false)
506+ then true
507+ else if (if ((bet == 115))
508+ then if (if (if ((rand == 5))
509+ then true
510+ else (rand == 6))
511+ then true
512+ else (rand == 8))
513+ then true
514+ else (rand == 9)
515+ else false)
516+ then true
517+ else if (if ((bet == 116))
518+ then if (if (if ((rand == 7))
519+ then true
520+ else (rand == 8))
521+ then true
522+ else (rand == 10))
523+ then true
524+ else (rand == 11)
525+ else false)
526+ then true
527+ else if (if ((bet == 117))
528+ then if (if (if ((rand == 8))
529+ then true
530+ else (rand == 9))
531+ then true
532+ else (rand == 11))
533+ then true
534+ else (rand == 12)
535+ else false)
536+ then true
537+ else if (if ((bet == 118))
538+ then if (if (if ((rand == 10))
539+ then true
540+ else (rand == 11))
541+ then true
542+ else (rand == 13))
543+ then true
544+ else (rand == 14)
545+ else false)
546+ then true
547+ else if (if ((bet == 119))
548+ then if (if (if ((rand == 11))
549+ then true
550+ else (rand == 12))
551+ then true
552+ else (rand == 14))
553+ then true
554+ else (rand == 15)
555+ else false)
556+ then true
557+ else if (if ((bet == 120))
558+ then if (if (if ((rand == 13))
559+ then true
560+ else (rand == 14))
561+ then true
562+ else (rand == 16))
563+ then true
564+ else (rand == 17)
565+ else false)
566+ then true
567+ else if (if ((bet == 121))
568+ then if (if (if ((rand == 14))
569+ then true
570+ else (rand == 15))
571+ then true
572+ else (rand == 17))
573+ then true
574+ else (rand == 18)
575+ else false)
576+ then true
577+ else if (if ((bet == 122))
578+ then if (if (if ((rand == 16))
579+ then true
580+ else (rand == 17))
581+ then true
582+ else (rand == 19))
583+ then true
584+ else (rand == 20)
585+ else false)
586+ then true
587+ else if (if ((bet == 123))
588+ then if (if (if ((rand == 17))
589+ then true
590+ else (rand == 18))
591+ then true
592+ else (rand == 20))
593+ then true
594+ else (rand == 21)
595+ else false)
596+ then true
597+ else if (if ((bet == 124))
598+ then if (if (if ((rand == 19))
599+ then true
600+ else (rand == 20))
601+ then true
602+ else (rand == 22))
603+ then true
604+ else (rand == 23)
605+ else false)
606+ then true
607+ else if (if ((bet == 125))
608+ then if (if (if ((rand == 20))
609+ then true
610+ else (rand == 21))
611+ then true
612+ else (rand == 23))
613+ then true
614+ else (rand == 24)
615+ else false)
616+ then true
617+ else if (if ((bet == 126))
618+ then if (if (if ((rand == 22))
619+ then true
620+ else (rand == 23))
621+ then true
622+ else (rand == 25))
623+ then true
624+ else (rand == 26)
625+ else false)
626+ then true
627+ else if (if ((bet == 127))
628+ then if (if (if ((rand == 23))
629+ then true
630+ else (rand == 24))
631+ then true
632+ else (rand == 26))
633+ then true
634+ else (rand == 27)
635+ else false)
636+ then true
637+ else if (if ((bet == 128))
638+ then if (if (if ((rand == 25))
639+ then true
640+ else (rand == 26))
641+ then true
642+ else (rand == 28))
643+ then true
644+ else (rand == 29)
645+ else false)
646+ then true
647+ else if (if ((bet == 129))
648+ then if (if (if ((rand == 26))
649+ then true
650+ else (rand == 27))
651+ then true
652+ else (rand == 29))
653+ then true
654+ else (rand == 30)
655+ else false)
656+ then true
657+ else if (if ((bet == 130))
658+ then if (if (if ((rand == 28))
659+ then true
660+ else (rand == 29))
661+ then true
662+ else (rand == 31))
663+ then true
664+ else (rand == 32)
665+ else false)
666+ then true
667+ else if (if ((bet == 131))
668+ then if (if (if ((rand == 29))
669+ then true
670+ else (rand == 30))
671+ then true
672+ else (rand == 32))
673+ then true
674+ else (rand == 33)
675+ else false)
676+ then true
677+ else if (if ((bet == 132))
678+ then if (if (if ((rand == 31))
679+ then true
680+ else (rand == 32))
681+ then true
682+ else (rand == 34))
683+ then true
684+ else (rand == 35)
685+ else false)
686+ then true
687+ else if (if ((bet == 133))
688+ then if (if (if ((rand == 32))
689+ then true
690+ else (rand == 33))
691+ then true
692+ else (rand == 35))
693+ then true
694+ else (rand == 36)
695+ else false)
696+ then true
697+ else false
173698
174699
175-func isCorner (num1,num2) = if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((num1 == 1))
700+func LineBet (rand,bet) = if (if (if ((bet == 134))
701+ then (rand >= 1)
702+ else false)
703+ then (6 >= rand)
704+ else false)
176705 then true
177- else (num1 == 2))
178- then true
179- else (num1 == 4))
180- then true
181- else (num1 == 5))
182- then true
183- else (num1 == 7))
184- then true
185- else (num1 == 8))
186- then true
187- else (num1 == 10))
188- then true
189- else (num1 == 11))
190- then true
191- else (num1 == 13))
192- then true
193- else (num1 == 14))
194- then true
195- else (num1 == 16))
196- then true
197- else (num1 == 17))
198- then true
199- else (num1 == 19))
200- then true
201- else (num1 == 20))
202- then true
203- else (num1 == 22))
204- then true
205- else (num1 == 23))
206- then true
207- else (num1 == 25))
208- then true
209- else (num1 == 26))
210- then true
211- else (num1 == 28))
212- then true
213- else (num1 == 29))
214- then true
215- else (num1 == 31))
216- then true
217- else (num1 == 32))
218- then true
219- else if ((num1 == 0))
220- then (num2 == 1)
706+ else if (if (if ((bet == 135))
707+ then (rand >= 4)
221708 else false)
222- then true
223- else throw("Invalid corner move. Game aborted!")
709+ then (9 >= rand)
710+ else false)
711+ then true
712+ else if (if (if ((bet == 136))
713+ then (rand >= 7)
714+ else false)
715+ then (12 >= rand)
716+ else false)
717+ then true
718+ else if (if (if ((bet == 137))
719+ then (rand >= 10)
720+ else false)
721+ then (15 >= rand)
722+ else false)
723+ then true
724+ else if (if (if ((bet == 138))
725+ then (rand >= 13)
726+ else false)
727+ then (18 >= rand)
728+ else false)
729+ then true
730+ else if (if (if ((bet == 139))
731+ then (rand >= 16)
732+ else false)
733+ then (21 >= rand)
734+ else false)
735+ then true
736+ else if (if (if ((bet == 140))
737+ then (rand >= 19)
738+ else false)
739+ then (24 >= rand)
740+ else false)
741+ then true
742+ else if (if (if ((bet == 141))
743+ then (rand >= 22)
744+ else false)
745+ then (27 >= rand)
746+ else false)
747+ then true
748+ else if (if (if ((bet == 142))
749+ then (rand >= 25)
750+ else false)
751+ then (30 >= rand)
752+ else false)
753+ then true
754+ else if (if (if ((bet == 143))
755+ then (rand >= 28)
756+ else false)
757+ then (33 >= rand)
758+ else false)
759+ then true
760+ else if (if (if ((bet == 144))
761+ then (rand >= 31)
762+ else false)
763+ then (36 >= rand)
764+ else false)
765+ then true
766+ else false
224767
225768
226-func isLine (num) = if (if (if (if (if (if (if (if (if (if (if ((num == 1))
769+func ColumnBet (rand,bet) = if (if ((bet == 145))
770+ then if (if (if (if (if (if (if (if (if (if (if (if ((rand == 0))
771+ then true
772+ else (rand == 1))
773+ then true
774+ else (rand == 4))
775+ then true
776+ else (rand == 7))
777+ then true
778+ else (rand == 10))
779+ then true
780+ else (rand == 13))
781+ then true
782+ else (rand == 16))
783+ then true
784+ else (rand == 19))
785+ then true
786+ else (rand == 22))
787+ then true
788+ else (rand == 25))
789+ then true
790+ else (rand == 28))
791+ then true
792+ else (rand == 31))
793+ then true
794+ else (rand == 34)
795+ else false)
227796 then true
228- else (num == 4))
229- then true
230- else (num == 7))
231- then true
232- else (num == 10))
233- then true
234- else (num == 13))
235- then true
236- else (num == 16))
237- then true
238- else (num == 19))
239- then true
240- else (num == 22))
241- then true
242- else (num == 25))
243- then true
244- else (num == 28))
245- then true
246- else (num == 31))
247- then true
248- else throw("Invalid line move. Game aborted!")
797+ else if (if ((bet == 146))
798+ then if (if (if (if (if (if (if (if (if (if (if (if ((rand == 0))
799+ then true
800+ else (rand == 2))
801+ then true
802+ else (rand == 5))
803+ then true
804+ else (rand == 8))
805+ then true
806+ else (rand == 11))
807+ then true
808+ else (rand == 14))
809+ then true
810+ else (rand == 17))
811+ then true
812+ else (rand == 20))
813+ then true
814+ else (rand == 23))
815+ then true
816+ else (rand == 26))
817+ then true
818+ else (rand == 29))
819+ then true
820+ else (rand == 32))
821+ then true
822+ else (rand == 35)
823+ else false)
824+ then true
825+ else if (if ((bet == 147))
826+ then if (if (if (if (if (if (if (if (if (if (if (if ((rand == 0))
827+ then true
828+ else (rand == 3))
829+ then true
830+ else (rand == 6))
831+ then true
832+ else (rand == 9))
833+ then true
834+ else (rand == 12))
835+ then true
836+ else (rand == 15))
837+ then true
838+ else (rand == 18))
839+ then true
840+ else (rand == 21))
841+ then true
842+ else (rand == 24))
843+ then true
844+ else (rand == 27))
845+ then true
846+ else (rand == 30))
847+ then true
848+ else (rand == 33))
849+ then true
850+ else (rand == 36)
851+ else false)
852+ then true
853+ else false
249854
250855
251-func isColumn (column) = if (if (if ((column == 1))
856+func DozenBet (rand,bet) = if (if (if ((bet == 148))
857+ then (rand >= 1)
858+ else false)
859+ then (12 >= rand)
860+ else false)
252861 then true
253- else (column == 2))
254- then true
255- else (column == 3))
256- then true
257- else throw("Invalid column move. Game aborted!")
862+ else if (if (if ((bet == 149))
863+ then (rand >= 13)
864+ else false)
865+ then (24 >= rand)
866+ else false)
867+ then true
868+ else if (if (if ((bet == 150))
869+ then (rand >= 25)
870+ else false)
871+ then (36 >= rand)
872+ else false)
873+ then true
874+ else false
258875
259876
260-func isDozen (dozen) = if (if (if ((dozen == 1))
877+func ColorBet (rand,bet) = if (if ((bet == 151))
878+ then if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((rand == 1))
879+ then true
880+ else (rand == 3))
881+ then true
882+ else (rand == 5))
883+ then true
884+ else (rand == 7))
885+ then true
886+ else (rand == 9))
887+ then true
888+ else (rand == 12))
889+ then true
890+ else (rand == 14))
891+ then true
892+ else (rand == 16))
893+ then true
894+ else (rand == 18))
895+ then true
896+ else (rand == 19))
897+ then true
898+ else (rand == 21))
899+ then true
900+ else (rand == 23))
901+ then true
902+ else (rand == 25))
903+ then true
904+ else (rand == 27))
905+ then true
906+ else (rand == 30))
907+ then true
908+ else (rand == 32))
909+ then true
910+ else (rand == 34))
911+ then true
912+ else (rand == 36)
913+ else false)
261914 then true
262- else (dozen == 2))
263- then true
264- else (dozen == 3))
265- then true
266- else throw("Invalid dozen move. Game aborted!")
915+ else if (if ((bet == 152))
916+ then if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((rand == 2))
917+ then true
918+ else (rand == 4))
919+ then true
920+ else (rand == 6))
921+ then true
922+ else (rand == 8))
923+ then true
924+ else (rand == 10))
925+ then true
926+ else (rand == 11))
927+ then true
928+ else (rand == 13))
929+ then true
930+ else (rand == 15))
931+ then true
932+ else (rand == 17))
933+ then true
934+ else (rand == 20))
935+ then true
936+ else (rand == 22))
937+ then true
938+ else (rand == 24))
939+ then true
940+ else (rand == 26))
941+ then true
942+ else (rand == 28))
943+ then true
944+ else (rand == 29))
945+ then true
946+ else (rand == 31))
947+ then true
948+ else (rand == 33))
949+ then true
950+ else (rand == 35)
951+ else false)
952+ then true
953+ else false
267954
268955
269-func validateBetAndGetAmt (bet) = if ((size(bet) != 0))
270- then {
271- let betContents = split(bet, "_")
272- if ((size(betContents) == 5))
273- then {
274- let betType = parseInt(betContents[0])
275- let betAmount = parseIntValue(betContents[1])
276- let betNum1 = parseIntValue(betContents[2])
277- let betNum2 = parseIntValue(betContents[3])
278- let betNum3 = parseIntValue(betContents[4])
279- if (is0to36(betNum1))
280- then if ((betType == TSTRAIGHT))
281- then betAmount
282- else if ((betType == TSPLIT))
283- then if (isSplit(betNum1, betNum2, betNum3))
284- then betAmount
285- else 0
286- else if ((betType == TSTREET))
287- then if (isStreet(betNum1, betNum2))
288- then betAmount
289- else 0
290- else if ((betType == TCOLUMN))
291- then if (isCorner(betNum1, betNum2))
292- then betAmount
293- else 0
294- else if ((betType == TLINE))
295- then if (isLine(betNum1))
296- then betAmount
297- else 0
298- else if ((betType == TCOLUMN))
299- then if (isColumn(betNum1))
300- then betAmount
301- else 0
302- else if ((betType == TDOZEN))
303- then if (isDozen(betNum1))
304- then betAmount
305- else 0
306- else if ((betType == TRED))
307- then betAmount
308- else if ((betType == TBLACK))
309- then betAmount
310- else if ((betType == TODD))
311- then betAmount
312- else if ((betType == TEVEN))
313- then betAmount
314- else if ((betType == T1TO18))
315- then betAmount
316- else if ((betType == T19TO36))
317- then betAmount
318- else throw("Invalid bet type, Game aborted!")
319- else throw("Invalid bet range, Game aborted!")
320- }
321- else throw("Invalid bet structure, Game aborted!")
322- }
323- else 0
324-
325-
326-func getBetsAmt (bets) = {
327- let s = size(bets)
328- (validateBetAndGetAmt(if ((s >= 1))
329- then bets[0]
330- else "") + validateBetAndGetAmt(if ((s >= 2))
331- then bets[1]
332- else ""))
956+func EvenOddBet (rand,bet) = {
957+ let rem = (rand % 2)
958+ if (if (if ((rand > 0))
959+ then (bet == 153)
960+ else false)
961+ then (rem == 0)
962+ else false)
963+ then true
964+ else if (if (if ((rand > 0))
965+ then (bet == 154)
966+ else false)
967+ then (rem != 0)
968+ else false)
969+ then true
970+ else false
333971 }
334972
335973
336-func IncrementGameNum () = {
337- let gameNum = match getInteger(this, GAMESCOUNTERKEY) {
974+func LowHighBet (rand,bet) = if (if (if ((bet == 155))
975+ then (rand >= 1)
976+ else false)
977+ then (18 >= rand)
978+ else false)
979+ then true
980+ else if (if (if ((bet == 156))
981+ then (rand >= 19)
982+ else false)
983+ then (36 >= rand)
984+ else false)
985+ then true
986+ else false
987+
988+
989+func RouletteWin (rand,bet) = if (if ((bet >= 0))
990+ then (36 >= bet)
991+ else false)
992+ then StraightUpBet(rand, bet)
993+ else if (if ((bet >= 37))
994+ then (96 >= bet)
995+ else false)
996+ then SplitBet(rand, bet)
997+ else if (if ((bet >= 97))
998+ then (110 >= bet)
999+ else false)
1000+ then StreetBet(rand, bet)
1001+ else if (if ((bet >= 111))
1002+ then (133 >= bet)
1003+ else false)
1004+ then CornerBet(rand, bet)
1005+ else if (if ((bet >= 134))
1006+ then (144 >= bet)
1007+ else false)
1008+ then LineBet(rand, bet)
1009+ else if (if ((bet >= 145))
1010+ then (147 >= bet)
1011+ else false)
1012+ then ColumnBet(rand, bet)
1013+ else if (if ((bet >= 148))
1014+ then (150 >= bet)
1015+ else false)
1016+ then DozenBet(rand, bet)
1017+ else if (if ((bet == 151))
1018+ then true
1019+ else (bet == 152))
1020+ then ColorBet(rand, bet)
1021+ else if (if ((bet == 153))
1022+ then true
1023+ else (bet == 154))
1024+ then EvenOddBet(rand, bet)
1025+ else if (if ((bet == 155))
1026+ then true
1027+ else (bet == 156))
1028+ then LowHighBet(rand, bet)
1029+ else throw("Random randber out of range, 0 <= rand <= 36")
1030+
1031+
1032+func Multiplier (bet) = if (if ((bet >= 0))
1033+ then (36 >= bet)
1034+ else false)
1035+ then 36
1036+ else if (if ((bet >= 37))
1037+ then (96 >= bet)
1038+ else false)
1039+ then 18
1040+ else if (if ((bet >= 97))
1041+ then (110 >= bet)
1042+ else false)
1043+ then 12
1044+ else if (if ((bet >= 111))
1045+ then (133 >= bet)
1046+ else false)
1047+ then 9
1048+ else if (if ((bet >= 134))
1049+ then (144 >= bet)
1050+ else false)
1051+ then 6
1052+ else if (if ((bet >= 145))
1053+ then (147 >= bet)
1054+ else false)
1055+ then 3
1056+ else if (if ((bet >= 148))
1057+ then (150 >= bet)
1058+ else false)
1059+ then 3
1060+ else if (if ((bet == 151))
1061+ then true
1062+ else (bet == 152))
1063+ then 2
1064+ else if (if ((bet == 153))
1065+ then true
1066+ else (bet == 154))
1067+ then 2
1068+ else if (if ((bet == 155))
1069+ then true
1070+ else (bet == 156))
1071+ then 2
1072+ else throw("Bet number out of range, 0 <= rand <= 156")
1073+
1074+
1075+func GetWinAmount (bet,amount) = {
1076+ let multi = Multiplier(bet)
1077+ let fee = fraction(amount, 6, 100)
1078+ ((amount * multi) - fee)
1079+ }
1080+
1081+
1082+func IncrementValue (value) = {
1083+ let provNum = match getInteger(this, value) {
3381084 case num: Int =>
3391085 num
3401086 case _ =>
3411087 0
3421088 }
343- (gameNum + 1)
1089+ (provNum + 1)
3441090 }
3451091
3461092
1093+func ExtractValue (value) = match getInteger(this, value) {
1094+ case a: Int =>
1095+ a
1096+ case _ =>
1097+ 0
1098+}
1099+
1100+
1101+func ValidateAndIncreaseReservedAmt (winAmt) = {
1102+ let newReservedAmount = (ExtractValue(RESERVATIONKEY) + winAmt)
1103+ let balance = assetBalance(this, WBET)
1104+ if ((newReservedAmount > balance))
1105+ then throw("Insufficient funds on Wavesbet Roulette account. Transaction was rejected for your safety.")
1106+ else newReservedAmount
1107+ }
1108+
1109+
1110+func DecreaseReservedAmt (winAmt) = {
1111+ let newReservedAmount = (ExtractValue(RESERVATIONKEY) - winAmt)
1112+ if ((0 > newReservedAmount))
1113+ then throw("Invalid roulette account state - reserved amount is less than 0")
1114+ else DataEntry(RESERVATIONKEY, newReservedAmount)
1115+ }
1116+
1117+
1118+func GenerateRandInt (gameId,rsaSign) = {
1119+ let rsaSigValid = rsaVerify(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC)
1120+ if (rsaSigValid)
1121+ then {
1122+ let rand = (toInt(sha256(rsaSign)) % 36)
1123+ if ((0 > rand))
1124+ then ((-1 * rand) + 1)
1125+ else (rand + 1)
1126+ }
1127+ else throw("Invalid RSA signature")
1128+ }
1129+
1130+
1131+func RandToStr (r) = if (if ((r >= 1))
1132+ then (36 >= r)
1133+ else false)
1134+ then toString(r)
1135+ else throw(("Unsupported r parameter passed: expected=[0,...,36] actual=" + toString(r)))
1136+
1137+
1138+func ExtractString (id) = {
1139+ let rawDataStr = match getString(this, id) {
1140+ case str: String =>
1141+ str
1142+ case _ =>
1143+ throw(("Couldn't find string by " + id))
1144+ }
1145+ rawDataStr
1146+ }
1147+
1148+
1149+func GetGameId (betIdO,betId) = if ((betIdO == "new"))
1150+ then (("game_" + betId) + "_bet_1")
1151+ else {
1152+ let beti = toString(IncrementValue(betIdO))
1153+ ((("game_" + betIdO) + "_bet_") + beti)
1154+ }
1155+
1156+
1157+func GetWriteSet (gameIdO,betId,gameId,winAmt,gameDataStr) = if ((gameIdO == "new"))
1158+ then WriteSet([DataEntry(GAMESCOUNTERKEY, IncrementValue(GAMESCOUNTERKEY)), DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(betId, 1), DataEntry(gameId, gameDataStr)])
1159+ else WriteSet([DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(gameIdO, IncrementValue(gameIdO)), DataEntry(gameId, gameDataStr)])
1160+
1161+
3471162 @Callable(i)
348-func playRoulette (bets) = {
349- let betList = split(bets, "|")
350- let t = getBetsAmt(betList)
351- throw(toString(t))
1163+func playRoulette (bet,gameIdO) = {
1164+ let betId = toBase58String(i.transactionId)
1165+ let payment = extract(i.payment)
1166+ let feeAssetId = isDefined(i.feeAssetId)
1167+ let playerBalance = wavesBalance(i.caller)
1168+ let gameId = GetGameId(gameIdO, betId)
1169+ let gameIdUsed = isDefined(getString(this, gameId))
1170+ let winAmt = GetWinAmount(bet, payment.amount)
1171+ if ((payment.assetId != WBET))
1172+ then throw("Payment should be in Wavesbet")
1173+ else if ((1000000 > playerBalance))
1174+ then throw("There are not enough waves, it takes 0.01 Waves to bet. Game aborted.")
1175+ else if (feeAssetId)
1176+ then throw("Transaction's fee must be in Waves. Game aborted.")
1177+ else if (gameIdUsed)
1178+ then throw("Passed gameId had been used before. Game aborted.")
1179+ else {
1180+ let playerPubKey58 = toBase58String(i.callerPublicKey)
1181+ let gameDataStr = (((((("SUBMITTED" + "_") + toString(bet)) + "_") + playerPubKey58) + "_") + toString(winAmt))
1182+ ScriptResult(GetWriteSet(gameIdO, betId, gameId, winAmt, gameDataStr), TransferSet([ScriptTransfer(WALLETCOMMUNITY, fraction(payment.amount, FEECOMMUNITY, 100), WBET), ScriptTransfer(WALLETWAVESBET, fraction(payment.amount, FEEWAVESBET, 100), WBET), ScriptTransfer(WALLETMCAFEE, fraction(payment.amount, FEEMCAFEE, 100), WBET)]))
1183+ }
1184+ }
1185+
1186+
1187+
1188+@Callable(i)
1189+func withdraw (gameId,rsaSig) = {
1190+ let gameDataList = split(ExtractString(gameId), "_")
1191+ let gameState = gameDataList[0]
1192+ let bet = parseIntValue(gameDataList[1])
1193+ let playerPubKey58 = gameDataList[2]
1194+ let winAmt = parseIntValue(gameDataList[3])
1195+ let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58))
1196+ let decreasedReserves = DecreaseReservedAmt(winAmt)
1197+ if ((gameState != "SUBMITTED"))
1198+ then throw("Invalid game state for passed gameId. Game aborted. ")
1199+ else {
1200+ let gameDataString = split(gameId, "_")
1201+ let rand = GenerateRandInt(gameDataString[1], rsaSig)
1202+ let randStr = RandToStr(rand)
1203+ if (RouletteWin(rand, bet))
1204+ then {
1205+ let newGameDataStr = (((((((("WON" + "_") + gameDataList[1]) + "_") + playerPubKey58) + "_") + gameDataList[3]) + "_") + randStr)
1206+ ScriptResult(WriteSet([DataEntry(gameId, newGameDataStr), decreasedReserves]), TransferSet([ScriptTransfer(playerAddress, winAmt, WBET)]))
1207+ }
1208+ else {
1209+ let newGameDataStr = (((((((("LOST" + "_") + gameDataList[1]) + "_") + playerPubKey58) + "_") + gameDataList[3]) + "_") + randStr)
1210+ WriteSet([DataEntry(gameId, newGameDataStr), decreasedReserves])
1211+ }
1212+ }
3521213 }
3531214
3541215

github/deemru/w8io/169f3d6 
130.78 ms