tx · dRLUnYx19o21fTJ8GuTXYcHkc6deDAkf4SJ7zKmdGYV 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd: -0.10100000 Waves 2021.12.03 04:28 [1817432] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves
{ "type": 13, "id": "dRLUnYx19o21fTJ8GuTXYcHkc6deDAkf4SJ7zKmdGYV", "fee": 10100000, "feeAssetId": null, "timestamp": 1638494918302, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "5mzgaNtLhMLu76BSq1cVigKGTUQAcmTK5urTW6ige1phG9wF1ZmboDJZAG1g75Tjgwbn4oN7ZbZLB6FTbpoWGS4t" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgASAwoBCAAAAA4AAAAABmNhc2lubwIAAAAjM010YUNMNHYxYmpUYWJVcXM3b1U0b2ZTOGZiYWkzNFdNMWkAAAAABVdBVkVTAAAAAAA7msoAAAAAAAZtYXhCZXQJAABoAAAAAgAAAAAAAAAAZAUAAAAFV0FWRVMAAAAACXNlcGFyYXRvcgIAAAABLAEAAAAKZ2V0TmV3RGVjawAAAAAJAARMAAAAAgIAAAADMDFDCQAETAAAAAICAAAAAzAyQwkABEwAAAACAgAAAAMwM0MJAARMAAAAAgIAAAADMDRDCQAETAAAAAICAAAAAzA1QwkABEwAAAACAgAAAAMwNkMJAARMAAAAAgIAAAADMDdDCQAETAAAAAICAAAAAzA4QwkABEwAAAACAgAAAAMwOUMJAARMAAAAAgIAAAADMTBDCQAETAAAAAICAAAAAzExQwkABEwAAAACAgAAAAMxMkMJAARMAAAAAgIAAAADMTNDCQAETAAAAAICAAAAAzAxRAkABEwAAAACAgAAAAMwMkQJAARMAAAAAgIAAAADMDNECQAETAAAAAICAAAAAzA0RAkABEwAAAACAgAAAAMwNUQJAARMAAAAAgIAAAADMDZECQAETAAAAAICAAAAAzA3RAkABEwAAAACAgAAAAMwOEQJAARMAAAAAgIAAAADMDlECQAETAAAAAICAAAAAzEwRAkABEwAAAACAgAAAAMxMUQJAARMAAAAAgIAAAADMTJECQAETAAAAAICAAAAAzEzRAkABEwAAAACAgAAAAMwMUgJAARMAAAAAgIAAAADMDJICQAETAAAAAICAAAAAzAzSAkABEwAAAACAgAAAAMwNEgJAARMAAAAAgIAAAADMDVICQAETAAAAAICAAAAAzA2SAkABEwAAAACAgAAAAMwN0gJAARMAAAAAgIAAAADMDhICQAETAAAAAICAAAAAzA5SAkABEwAAAACAgAAAAMxMEgJAARMAAAAAgIAAAADMTFICQAETAAAAAICAAAAAzEySAkABEwAAAACAgAAAAMxM0gJAARMAAAAAgIAAAADMDFTCQAETAAAAAICAAAAAzAyUwkABEwAAAACAgAAAAMwM1MJAARMAAAAAgIAAAADMDRTCQAETAAAAAICAAAAAzA1UwkABEwAAAACAgAAAAMwNlMJAARMAAAAAgIAAAADMDdTCQAETAAAAAICAAAAAzA4UwkABEwAAAACAgAAAAMwOVMJAARMAAAAAgIAAAADMTBTCQAETAAAAAICAAAAAzExUwkABEwAAAACAgAAAAMxMlMJAARMAAAAAgIAAAADMTNTBQAAAANuaWwBAAAADmdldFNpeE5ld0RlY2tzAAAAAAkABE4AAAACCQAETgAAAAIJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAABAAAAB2dldERlY2sAAAABAAAABGRlY2sDCQAAZwAAAAIAAAAAAAAAAAAJAAGQAAAAAQUAAAAEZGVjawkBAAAADmdldFNpeE5ld0RlY2tzAAAAAAUAAAAEZGVjawEAAAAPZ2V0UmFuZG9tTnV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AAA1hdmFpbGFibGVQcm9wCQAEuQAAAAIFAAAAB2F2RGVjazIFAAAACXNlcGFyYXRvcgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAABXJvdW5kAgAAAAZfcm91bmQFAAAABXJvdW5kCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIFAAAABXJvdW5kAgAAABFfTGFzdFJhbmRvbk51bWJlcgUAAAASY2FyZFBvc2l0aW9uQ2FzaW5vCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgUAAAAFcm91bmQCAAAAC19wbGF5ZXJDYXJkBQAAAApjYXJkUGxheWVyCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgUAAAAFcm91bmQCAAAAC19jYXNpbm9DYXJkBQAAAApjYXJkQ2FzaW5vCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIFAAAABXJvdW5kAgAAAApfYmV0QW1vdW50BQAAAAFwCQAETAAAAAIJAQAAAAxCb29sZWFuRW50cnkAAAACCQABLAAAAAIFAAAABXJvdW5kAgAAAAVfc3RvcAYFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5FizDkg==", "height": 1817432, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6kxwcZsfp29LASAjjBZJrNsoNi7Xd1bxzy2XdEb3bs5u Next: 3GzD2Kzydqm13Kxv3TQSPxhyBRjxLgbLHCg1tGG75xjQ Diff:
Old | New | Differences | |
---|---|---|---|
113 | 113 | else { | |
114 | 114 | let availableProp = (round + "_deck") | |
115 | 115 | let avDeck = getAvailableDeck(this, availableProp) | |
116 | - | let $ | |
117 | - | let cardPlayer = $ | |
118 | - | let cardPositionPlayer = $ | |
119 | - | let avDeck1 = $ | |
120 | - | let $ | |
121 | - | let cardCasino = $ | |
122 | - | let cardPositionCasino = $ | |
123 | - | let avDeck2 = $ | |
116 | + | let $t034893596 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck) | |
117 | + | let cardPlayer = $t034893596._1 | |
118 | + | let cardPositionPlayer = $t034893596._2 | |
119 | + | let avDeck1 = $t034893596._3 | |
120 | + | let $t036013720 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1) | |
121 | + | let cardCasino = $t036013720._1 | |
122 | + | let cardPositionCasino = $t036013720._2 | |
123 | + | let avDeck2 = $t036013720._3 | |
124 | 124 | if ((1 == 1)) | |
125 | 125 | then { | |
126 | 126 | let currentDraws = 1 | |
151 | 151 | else if (!(isDefined(getInteger(this, (round + "_drawSequence"))))) | |
152 | 152 | then throw("This game is not on war") | |
153 | 153 | else { | |
154 | - | let betAmount = match getInteger(this, ( | |
154 | + | let betAmount = match getInteger(this, (round + "_betAmount")) { | |
155 | 155 | case a: Int => | |
156 | 156 | a | |
157 | 157 | case _ => | |
178 | 178 | else if (!(isDefined(getInteger(this, (round + "_drawSequence"))))) | |
179 | 179 | then throw("This game is not on war") | |
180 | 180 | else { | |
181 | - | let betAmount = match getInteger(this, ( | |
181 | + | let betAmount = match getInteger(this, (round + "_betAmount")) { | |
182 | 182 | case a: Int => | |
183 | 183 | a | |
184 | 184 | case _ => | |
185 | 185 | throw("Unable to find original bet amount") | |
186 | 186 | } | |
187 | - | let $ | |
188 | - | let p = $ | |
189 | - | let t = $ | |
187 | + | let $t080488074 = getPayments(i) | |
188 | + | let p = $t080488074._1 | |
189 | + | let t = $t080488074._2 | |
190 | 190 | if ((p != betAmount)) | |
191 | 191 | then throw((((("original bet amount (" + toString(betAmount)) + ") different to the current payment (") + toString(p)) + ")")) | |
192 | 192 | else { | |
193 | 193 | let availableProp = (round + "_deck") | |
194 | 194 | let avDeck = getAvailableDeck(this, availableProp) | |
195 | - | let $ | |
196 | - | let burned1 = $ | |
197 | - | let burnedPos1 = $ | |
198 | - | let burnedDeck1 = $ | |
199 | - | let $ | |
200 | - | let burned2 = $ | |
201 | - | let burnedPos2 = $ | |
202 | - | let burnedDeck2 = $ | |
203 | - | let $ | |
204 | - | let burned3 = $ | |
205 | - | let burnedPos3 = $ | |
206 | - | let burnedDeck3 = $ | |
207 | - | let $ | |
208 | - | let cardPlayer = $ | |
209 | - | let cardPositionPlayer = $ | |
210 | - | let avDeck1 = $ | |
211 | - | let $ | |
212 | - | let cardCasino = $ | |
213 | - | let cardPositionCasino = $ | |
214 | - | let avDeck2 = $ | |
195 | + | let $t083648464 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck) | |
196 | + | let burned1 = $t083648464._1 | |
197 | + | let burnedPos1 = $t083648464._2 | |
198 | + | let burnedDeck1 = $t083648464._3 | |
199 | + | let $t084778590 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), round, burnedDeck1) | |
200 | + | let burned2 = $t084778590._1 | |
201 | + | let burnedPos2 = $t084778590._2 | |
202 | + | let burnedDeck2 = $t084778590._3 | |
203 | + | let $t086038716 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), round, burnedDeck2) | |
204 | + | let burned3 = $t086038716._1 | |
205 | + | let burnedPos3 = $t086038716._2 | |
206 | + | let burnedDeck3 = $t086038716._3 | |
207 | + | let $t087298849 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), round, burnedDeck3) | |
208 | + | let cardPlayer = $t087298849._1 | |
209 | + | let cardPositionPlayer = $t087298849._2 | |
210 | + | let avDeck1 = $t087298849._3 | |
211 | + | let $t088628981 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1) | |
212 | + | let cardCasino = $t088628981._1 | |
213 | + | let cardPositionCasino = $t088628981._2 | |
214 | + | let avDeck2 = $t088628981._3 | |
215 | 215 | if ((getCardValue(cardPlayer) == getCardValue(cardCasino))) | |
216 | 216 | then { | |
217 | 217 | let currentDraws = match getInteger(this, (round + "_drawSequence")) { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let casino = "3MtaCL4v1bjTabUqs7oU4ofS8fbai34WM1i" | |
5 | 5 | ||
6 | 6 | let WAVES = 1000000000 | |
7 | 7 | ||
8 | 8 | let maxBet = (100 * WAVES) | |
9 | 9 | ||
10 | 10 | let separator = "," | |
11 | 11 | ||
12 | 12 | func getNewDeck () = ["01C", "02C", "03C", "04C", "05C", "06C", "07C", "08C", "09C", "10C", "11C", "12C", "13C", "01D", "02D", "03D", "04D", "05D", "06D", "07D", "08D", "09D", "10D", "11D", "12D", "13D", "01H", "02H", "03H", "04H", "05H", "06H", "07H", "08H", "09H", "10H", "11H", "12H", "13H", "01S", "02S", "03S", "04S", "05S", "06S", "07S", "08S", "09S", "10S", "11S", "12S", "13S"] | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func getSixNewDecks () = (((((getNewDeck() ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func getDeck (deck) = if ((0 >= size(deck))) | |
19 | 19 | then getSixNewDecks() | |
20 | 20 | else deck | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func getRandomNumber (salt1,salt2,answersCount) = { | |
24 | 24 | let hash = sha256(toBytes((salt1 + salt2))) | |
25 | 25 | let index = toInt(hash) | |
26 | 26 | let rand = (index % answersCount) | |
27 | 27 | if ((0 > rand)) | |
28 | 28 | then ((-1 * rand) + 1) | |
29 | 29 | else (rand + 1) | |
30 | 30 | } | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func getPreviousRandomNumber (address) = match getInteger(this, (address + "_LastRandonNumber")) { | |
34 | 34 | case n: Int => | |
35 | 35 | toString(n) | |
36 | 36 | case _ => | |
37 | 37 | address | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func getPayments (i) = if ((size(i.payments) == 0)) | |
42 | 42 | then throw("Payment must be attached") | |
43 | 43 | else if ((size(i.payments) == 1)) | |
44 | 44 | then { | |
45 | 45 | let pmt = i.payments[0] | |
46 | 46 | if (isDefined(pmt.assetId)) | |
47 | 47 | then throw("This function accepts WAVES tokens only (0)") | |
48 | 48 | else $Tuple2(pmt.amount, 0) | |
49 | 49 | } | |
50 | 50 | else { | |
51 | 51 | let pmt = i.payments[0] | |
52 | 52 | if (isDefined(pmt.assetId)) | |
53 | 53 | then throw("This function accepts WAVES tokens only (10)") | |
54 | 54 | else { | |
55 | 55 | let pmt2 = i.payments[1] | |
56 | 56 | if (isDefined(pmt2.assetId)) | |
57 | 57 | then throw("This function accepts WAVES tokens only (11)") | |
58 | 58 | else $Tuple2(pmt.amount, pmt2.amount) | |
59 | 59 | } | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func getCardValue (stringCard) = { | |
64 | 64 | let p = parseIntValue(take(stringCard, 2)) | |
65 | 65 | if ((p == 1)) | |
66 | 66 | then 20 | |
67 | 67 | else p | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func isPlayerWinner (cardPlayer,cardCasino) = { | |
72 | 72 | let p = getCardValue(cardPlayer) | |
73 | 73 | let o = getCardValue(cardCasino) | |
74 | 74 | (p > o) | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getAvailableDeck (this,availableProp) = if (isDefined(getString(this, availableProp))) | |
79 | 79 | then { | |
80 | 80 | let stringDeck = getStringValue(this, availableProp) | |
81 | 81 | let deck = split(stringDeck, separator) | |
82 | 82 | getDeck(deck) | |
83 | 83 | } | |
84 | 84 | else getSixNewDecks() | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getPlayerCardAndPositionAndUpdateDeck (meKey,callerAddress,deck) = { | |
88 | 88 | let avDeck2 = getDeck(deck) | |
89 | 89 | let cardPosition = getRandomNumber(((meKey + makeString(avDeck2, separator)) + callerAddress), getPreviousRandomNumber(callerAddress), size(avDeck2)) | |
90 | 90 | let card = avDeck2[(cardPosition % size(avDeck2))] | |
91 | 91 | let avDeck3 = removeByIndex(avDeck2, (cardPosition % size(avDeck2))) | |
92 | 92 | $Tuple3(card, cardPosition, avDeck3) | |
93 | 93 | } | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | @Callable(i) | |
97 | 97 | func bet () = { | |
98 | 98 | let callerAddress = toBase58String(i.caller.bytes) | |
99 | 99 | let $t029833009 = getPayments(i) | |
100 | 100 | let p = $t029833009._1 | |
101 | 101 | let t = $t029833009._2 | |
102 | 102 | let currentRound = match getInteger(this, (callerAddress + "_round")) { | |
103 | 103 | case a: Int => | |
104 | 104 | (a + 1) | |
105 | 105 | case _ => | |
106 | 106 | 1 | |
107 | 107 | } | |
108 | 108 | let round = ((callerAddress + "_") + toString(currentRound)) | |
109 | 109 | if (isDefined(getBoolean(this, (round + "_stop")))) | |
110 | 110 | then throw("This round is already played") | |
111 | 111 | else if (isDefined(getString(this, round))) | |
112 | 112 | then throw("You cannot bet on this game") | |
113 | 113 | else { | |
114 | 114 | let availableProp = (round + "_deck") | |
115 | 115 | let avDeck = getAvailableDeck(this, availableProp) | |
116 | - | let $ | |
117 | - | let cardPlayer = $ | |
118 | - | let cardPositionPlayer = $ | |
119 | - | let avDeck1 = $ | |
120 | - | let $ | |
121 | - | let cardCasino = $ | |
122 | - | let cardPositionCasino = $ | |
123 | - | let avDeck2 = $ | |
116 | + | let $t034893596 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck) | |
117 | + | let cardPlayer = $t034893596._1 | |
118 | + | let cardPositionPlayer = $t034893596._2 | |
119 | + | let avDeck1 = $t034893596._3 | |
120 | + | let $t036013720 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1) | |
121 | + | let cardCasino = $t036013720._1 | |
122 | + | let cardPositionCasino = $t036013720._2 | |
123 | + | let avDeck2 = $t036013720._3 | |
124 | 124 | if ((1 == 1)) | |
125 | 125 | then { | |
126 | 126 | let currentDraws = 1 | |
127 | 127 | if ((t != 0)) | |
128 | 128 | then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), p), StringEntry((round + "_debug"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, (t * 10)=") + toString(((t * 10) + t))) + ", unit)")), ScriptTransfer(i.caller, ((t * 10) + t), unit)] | |
129 | 129 | else [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), p)] | |
130 | 130 | } | |
131 | 131 | else if (isPlayerWinner(cardPlayer, cardCasino)) | |
132 | 132 | then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), p), StringEntry((round + "_debug"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, p=") + toString(p)) + ", unit)")), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)] | |
133 | 133 | else [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), p), BooleanEntry((round + "_stop"), true)] | |
134 | 134 | } | |
135 | 135 | } | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | ||
139 | 139 | @Callable(i) | |
140 | 140 | func surrender () = { | |
141 | 141 | let callerAddress = toBase58String(i.caller.bytes) | |
142 | 142 | let currentRound = match getInteger(this, (callerAddress + "_round")) { | |
143 | 143 | case a: Int => | |
144 | 144 | toString(a) | |
145 | 145 | case _ => | |
146 | 146 | throw("Unable to find the round") | |
147 | 147 | } | |
148 | 148 | let round = ((callerAddress + "_") + currentRound) | |
149 | 149 | if (isDefined(getBoolean(this, (round + "_stop")))) | |
150 | 150 | then throw("This round is already played") | |
151 | 151 | else if (!(isDefined(getInteger(this, (round + "_drawSequence"))))) | |
152 | 152 | then throw("This game is not on war") | |
153 | 153 | else { | |
154 | - | let betAmount = match getInteger(this, ( | |
154 | + | let betAmount = match getInteger(this, (round + "_betAmount")) { | |
155 | 155 | case a: Int => | |
156 | 156 | a | |
157 | 157 | case _ => | |
158 | 158 | throw("Unable to find original bet amount") | |
159 | 159 | } | |
160 | 160 | [StringEntry(((round + toString(betAmount)) + " _debug"), (("ScriptTransfer(i.caller, betAmount / 2=" + toString((betAmount / 2))) + ", unit)")), ScriptTransfer(i.caller, (betAmount / 2), unit), BooleanEntry((round + "_stop"), true)] | |
161 | 161 | } | |
162 | 162 | } | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | ||
166 | 166 | @Callable(i) | |
167 | 167 | func goToWar (customRound) = { | |
168 | 168 | let callerAddress = toBase58String(i.caller.bytes) | |
169 | 169 | let currentRound = match getInteger(this, (callerAddress + "_round")) { | |
170 | 170 | case a: Int => | |
171 | 171 | a | |
172 | 172 | case _ => | |
173 | 173 | throw("Unable to find the round") | |
174 | 174 | } | |
175 | 175 | let round = ((callerAddress + "_") + toString(currentRound)) | |
176 | 176 | if (isDefined(getBoolean(this, (round + "_stop")))) | |
177 | 177 | then throw("This round is already played") | |
178 | 178 | else if (!(isDefined(getInteger(this, (round + "_drawSequence"))))) | |
179 | 179 | then throw("This game is not on war") | |
180 | 180 | else { | |
181 | - | let betAmount = match getInteger(this, ( | |
181 | + | let betAmount = match getInteger(this, (round + "_betAmount")) { | |
182 | 182 | case a: Int => | |
183 | 183 | a | |
184 | 184 | case _ => | |
185 | 185 | throw("Unable to find original bet amount") | |
186 | 186 | } | |
187 | - | let $ | |
188 | - | let p = $ | |
189 | - | let t = $ | |
187 | + | let $t080488074 = getPayments(i) | |
188 | + | let p = $t080488074._1 | |
189 | + | let t = $t080488074._2 | |
190 | 190 | if ((p != betAmount)) | |
191 | 191 | then throw((((("original bet amount (" + toString(betAmount)) + ") different to the current payment (") + toString(p)) + ")")) | |
192 | 192 | else { | |
193 | 193 | let availableProp = (round + "_deck") | |
194 | 194 | let avDeck = getAvailableDeck(this, availableProp) | |
195 | - | let $ | |
196 | - | let burned1 = $ | |
197 | - | let burnedPos1 = $ | |
198 | - | let burnedDeck1 = $ | |
199 | - | let $ | |
200 | - | let burned2 = $ | |
201 | - | let burnedPos2 = $ | |
202 | - | let burnedDeck2 = $ | |
203 | - | let $ | |
204 | - | let burned3 = $ | |
205 | - | let burnedPos3 = $ | |
206 | - | let burnedDeck3 = $ | |
207 | - | let $ | |
208 | - | let cardPlayer = $ | |
209 | - | let cardPositionPlayer = $ | |
210 | - | let avDeck1 = $ | |
211 | - | let $ | |
212 | - | let cardCasino = $ | |
213 | - | let cardPositionCasino = $ | |
214 | - | let avDeck2 = $ | |
195 | + | let $t083648464 = getPlayerCardAndPositionAndUpdateDeck(round, round, avDeck) | |
196 | + | let burned1 = $t083648464._1 | |
197 | + | let burnedPos1 = $t083648464._2 | |
198 | + | let burnedDeck1 = $t083648464._3 | |
199 | + | let $t084778590 = getPlayerCardAndPositionAndUpdateDeck((round + burned1), round, burnedDeck1) | |
200 | + | let burned2 = $t084778590._1 | |
201 | + | let burnedPos2 = $t084778590._2 | |
202 | + | let burnedDeck2 = $t084778590._3 | |
203 | + | let $t086038716 = getPlayerCardAndPositionAndUpdateDeck((round + burned2), round, burnedDeck2) | |
204 | + | let burned3 = $t086038716._1 | |
205 | + | let burnedPos3 = $t086038716._2 | |
206 | + | let burnedDeck3 = $t086038716._3 | |
207 | + | let $t087298849 = getPlayerCardAndPositionAndUpdateDeck((round + burned3), round, burnedDeck3) | |
208 | + | let cardPlayer = $t087298849._1 | |
209 | + | let cardPositionPlayer = $t087298849._2 | |
210 | + | let avDeck1 = $t087298849._3 | |
211 | + | let $t088628981 = getPlayerCardAndPositionAndUpdateDeck((round + cardPlayer), round, avDeck1) | |
212 | + | let cardCasino = $t088628981._1 | |
213 | + | let cardPositionCasino = $t088628981._2 | |
214 | + | let avDeck2 = $t088628981._3 | |
215 | 215 | if ((getCardValue(cardPlayer) == getCardValue(cardCasino))) | |
216 | 216 | then { | |
217 | 217 | let currentDraws = match getInteger(this, (round + "_drawSequence")) { | |
218 | 218 | case a: Int => | |
219 | 219 | (a + 1) | |
220 | 220 | case _ => | |
221 | 221 | 0 | |
222 | 222 | } | |
223 | 223 | [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), p)] | |
224 | 224 | } | |
225 | 225 | else if (isPlayerWinner(cardPlayer, cardCasino)) | |
226 | 226 | then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), p), StringEntry((round + "_debug"), (((((toString(p) + "-") + toString(t)) + " ScriptTransfer(i.caller, p=") + toString(p)) + ", unit)")), ScriptTransfer(i.caller, p, unit), BooleanEntry((round + "_stop"), true)] | |
227 | 227 | else [StringEntry(availableProp, makeString(avDeck2, separator)), StringEntry((round + "_round"), round), IntegerEntry((round + "_LastRandonNumber"), cardPositionCasino), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), p), BooleanEntry((round + "_stop"), true)] | |
228 | 228 | } | |
229 | 229 | } | |
230 | 230 | } | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | @Verifier(tx) | |
234 | 234 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
235 | 235 |
github/deemru/w8io/169f3d6 64.16 ms ◑