tx · 2dsrLXLvfa6Ztr83PaAxRce7DXdvtsNHsgjvYdBrRkB3 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd: -0.10000000 Waves 2021.12.17 01:46 [1837447] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves
{ "type": 13, "id": "2dsrLXLvfa6Ztr83PaAxRce7DXdvtsNHsgjvYdBrRkB3", "fee": 10000000, "feeAssetId": null, "timestamp": 1639694799786, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "PNLgSTyKH5i7cXWK96K5oqF8DiQsk3gFUZqDDwzvt2NWYpgzbGh7D4He5tXejMhN7sBNxyn2vDzcBT3EfME421Z" ], "script": "base64:AAIFAAAAAAAAABIIAhIECgIBARIDCgEBEgMKAQEAAAANAAAAAAlzZXBhcmF0b3ICAAAAASwAAAAABm1heEJldAAAAAAABfXhAAEAAAAGZ2V0RmVlAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAW4FAAAAByRtYXRjaDAFAAAAAW4JAAACAAAAAQIAAAAbSW5pdGlhbCBmZWUgY2Fubm90IGJlIGZvdW5kAQAAAApnZXROZXdEZWNrAAAAAAkABEwAAAACAgAAAAMwMUMJAARMAAAAAgIAAAADMDJDCQAETAAAAAICAAAAAzAzQwkABEwAAAACAgAAAAMwNEMJAARMAAAAAgIAAAADMDVDCQAETAAAAAICAAAAAzA2QwkABEwAAAACAgAAAAMwN0MJAARMAAAAAgIAAAADMDhDCQAETAAAAAICAAAAAzA5QwkABEwAAAACAgAAAAMxMEMJAARMAAAAAgIAAAADMTFDCQAETAAAAAICAAAAAzEyQwkABEwAAAACAgAAAAMxM0MJAARMAAAAAgIAAAADMDFECQAETAAAAAICAAAAAzAyRAkABEwAAAACAgAAAAMwM0QJAARMAAAAAgIAAAADMDRECQAETAAAAAICAAAAAzA1RAkABEwAAAACAgAAAAMwNkQJAARMAAAAAgIAAAADMDdECQAETAAAAAICAAAAAzA4RAkABEwAAAACAgAAAAMwOUQJAARMAAAAAgIAAAADMTBECQAETAAAAAICAAAAAzExRAkABEwAAAACAgAAAAMxMkQJAARMAAAAAgIAAAADMTNECQAETAAAAAICAAAAAzAxSAkABEwAAAACAgAAAAMwMkgJAARMAAAAAgIAAAADMDNICQAETAAAAAICAAAAAzA0SAkABEwAAAACAgAAAAMwNUgJAARMAAAAAgIAAAADMDZICQAETAAAAAICAAAAAzA3SAkABEwAAAACAgAAAAMwOEgJAARMAAAAAgIAAAADMDlICQAETAAAAAICAAAAAzEwSAkABEwAAAACAgAAAAMxMUgJAARMAAAAAgIAAAADMTJICQAETAAAAAICAAAAAzEzSAkABEwAAAACAgAAAAMwMVMJAARMAAAAAgIAAAADMDJTCQAETAAAAAICAAAAAzAzUwkABEwAAAACAgAAAAMwNFMJAARMAAAAAgIAAAADMDVTCQAETAAAAAICAAAAAzA2UwkABEwAAAACAgAAAAMwN1MJAARMAAAAAgIAAAADMDhTCQAETAAAAAICAAAAAzA5UwkABEwAAAACAgAAAAMxMFMJAARMAAAAAgIAAAADMTFTCQAETAAAAAICAAAAAzEyUwkABEwAAAACAgAAAAMxM1MFAAAAA25pbAEAAAAOZ2V0U2l4TmV3RGVja3MAAAAACQAETgAAAAIJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAAROAAAAAgkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAkBAAAACmdldE5ld0RlY2sAAAAACQEAAAAKZ2V0TmV3RGVjawAAAAAJAQAAAApnZXROZXdEZWNrAAAAAAEAAAAHZ2V0RGVjawAAAAEAAAAEZGVjawMJAABnAAAAAgAAAA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AACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgkAASwAAAACBQAAAAVyb3VuZAIAAAAFX3N0b3AGBQAAAANuaWwJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAANYXZhaWxhYmxlUHJvcAkABLkAAAACBQAAAAdhdkRlY2syBQAAAAlzZXBhcmF0b3IJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACBQAAAAVyb3VuZAIAAAALX3BsYXllckNhcmQFAAAACmNhcmRQbGF5ZXIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACBQAAAAVyb3VuZAIAAAALX2Nhc2lub0NhcmQFAAAACmNhcmRDYXNpbm8JAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIJAAEsAAAAAgUAAAAFcm91bmQCAAAABV9zdG9wBgUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlfJXEV", "height": 1837447, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: YCFKSAQy9xJwrcb625v9642tFQqdPnG3P2xQBf5wg8s Next: BiKxp9cmsmQmAt7pwPhmn6XEs2SoXNVzEdCtpPHMGTpp Diff:
Old | New | Differences | |
---|---|---|---|
114 | 114 | else { | |
115 | 115 | let availableProp = (round + "_deck") | |
116 | 116 | let avDeck = getAvailableDeck(this, availableProp) | |
117 | - | let $ | |
118 | - | let cardPlayer = $ | |
119 | - | let cardPositionPlayer = $ | |
120 | - | let avDeck1 = $ | |
121 | - | let $ | |
122 | - | let cardCasino = $ | |
123 | - | let cardPositionCasino = $ | |
124 | - | let avDeck2 = $ | |
117 | + | let $t037843904 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck) | |
118 | + | let cardPlayer = $t037843904._1 | |
119 | + | let cardPositionPlayer = $t037843904._2 | |
120 | + | let avDeck1 = $t037843904._3 | |
121 | + | let $t039094030 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck1) | |
122 | + | let cardCasino = $t039094030._1 | |
123 | + | let cardPositionCasino = $t039094030._2 | |
124 | + | let avDeck2 = $t039094030._3 | |
125 | 125 | if ((getCardValue(cardPlayer) == getCardValue(cardCasino))) | |
126 | 126 | then { | |
127 | 127 | let currentDraws = 1 | |
187 | 187 | else { | |
188 | 188 | let availableProp = (round + "_deck") | |
189 | 189 | let avDeck = getAvailableDeck(this, availableProp) | |
190 | - | let $ | |
191 | - | let burned1 = $ | |
192 | - | let burnedPos1 = $ | |
193 | - | let burnedDeck1 = $ | |
194 | - | let $ | |
195 | - | let burned2 = $ | |
196 | - | let burnedPos2 = $ | |
197 | - | let burnedDeck2 = $ | |
198 | - | let $ | |
199 | - | let burned3 = $ | |
200 | - | let burnedPos3 = $ | |
201 | - | let burnedDeck3 = $ | |
202 | - | let $ | |
203 | - | let cardPlayer = $ | |
204 | - | let cardPositionPlayer = $ | |
205 | - | let avDeck1 = $ | |
206 | - | let $ | |
207 | - | let cardCasino = $ | |
208 | - | let cardPositionCasino = $ | |
209 | - | let avDeck2 = $ | |
190 | + | let $t090039114 = getPlayerCardAndPositionAndUpdateDeck(i, toString(roundToUse), avDeck) | |
191 | + | let burned1 = $t090039114._1 | |
192 | + | let burnedPos1 = $t090039114._2 | |
193 | + | let burnedDeck1 = $t090039114._3 | |
194 | + | let $t091279253 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned1), burnedDeck1) | |
195 | + | let burned2 = $t091279253._1 | |
196 | + | let burnedPos2 = $t091279253._2 | |
197 | + | let burnedDeck2 = $t091279253._3 | |
198 | + | let $t092669392 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned2), burnedDeck2) | |
199 | + | let burned3 = $t092669392._1 | |
200 | + | let burnedPos3 = $t092669392._2 | |
201 | + | let burnedDeck3 = $t092669392._3 | |
202 | + | let $t094059538 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned3), burnedDeck3) | |
203 | + | let cardPlayer = $t094059538._1 | |
204 | + | let cardPositionPlayer = $t094059538._2 | |
205 | + | let avDeck1 = $t094059538._3 | |
206 | + | let $t095519683 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + cardPlayer), avDeck1) | |
207 | + | let cardCasino = $t095519683._1 | |
208 | + | let cardPositionCasino = $t095519683._2 | |
209 | + | let avDeck2 = $t095519683._3 | |
210 | 210 | if ((getCardValue(cardPlayer) == getCardValue(cardCasino))) | |
211 | 211 | then { | |
212 | 212 | 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 separator = "," | |
5 | 5 | ||
6 | 6 | let maxBet = 100000000 | |
7 | 7 | ||
8 | 8 | func getFee (key) = match getInteger(this, key) { | |
9 | 9 | case n: Int => | |
10 | 10 | n | |
11 | 11 | case _ => | |
12 | 12 | throw("Initial fee cannot be found") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | 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"] | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func getSixNewDecks () = (((((getNewDeck() ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) ++ getNewDeck()) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func getDeck (deck) = if ((0 >= size(deck))) | |
23 | 23 | then getSixNewDecks() | |
24 | 24 | else deck | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func getRandomNumber (i,salt1,salt2,answersCount) = { | |
28 | 28 | let generator = (toInt(sha256(((take(lastBlock.generationSignature, 16) + take(i.transactionId, 16)) + toBytes(salt1)))) % 17728) | |
29 | 29 | let index = (toInt(toBytes(pow(generator, 0, 2, 0, 0, HALFUP))) + toInt(toBytes(salt2))) | |
30 | 30 | let r = (index % answersCount) | |
31 | 31 | if ((0 > r)) | |
32 | 32 | then ((-1 * r) + 1) | |
33 | 33 | else (r + 1) | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func getPayments (i) = if ((size(i.payments) == 0)) | |
38 | 38 | then throw("Payment must be attached") | |
39 | 39 | else if ((size(i.payments) == 1)) | |
40 | 40 | then { | |
41 | 41 | let pmt = i.payments[0] | |
42 | 42 | if (isDefined(pmt.assetId)) | |
43 | 43 | then throw("This function accepts WAVES tokens only (0)") | |
44 | 44 | else pmt.amount | |
45 | 45 | } | |
46 | 46 | else throw("There should be only one payment") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func getCardValue (stringCard) = { | |
50 | 50 | let p = parseIntValue(take(stringCard, 2)) | |
51 | 51 | if ((p == 1)) | |
52 | 52 | then 20 | |
53 | 53 | else p | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func isPlayerWinner (cardPlayer,cardCasino) = { | |
58 | 58 | let p = getCardValue(cardPlayer) | |
59 | 59 | let o = getCardValue(cardCasino) | |
60 | 60 | (p > o) | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getAvailableDeck (this,availableProp) = if (isDefined(getString(this, availableProp))) | |
65 | 65 | then { | |
66 | 66 | let stringDeck = getStringValue(this, availableProp) | |
67 | 67 | let deck = split(stringDeck, separator) | |
68 | 68 | getDeck(deck) | |
69 | 69 | } | |
70 | 70 | else getSixNewDecks() | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func getPlayerCardAndPositionAndUpdateDeck (i,salt1,deck) = { | |
74 | 74 | let avDeck2 = getDeck(deck) | |
75 | 75 | let cardPosition = getRandomNumber(i, salt1, makeString(avDeck2, separator), size(avDeck2)) | |
76 | 76 | let card = avDeck2[(cardPosition % size(avDeck2))] | |
77 | 77 | let avDeck3 = removeByIndex(avDeck2, (cardPosition % size(avDeck2))) | |
78 | 78 | $Tuple3(card, cardPosition, avDeck3) | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getCurrentRound (customRound,callerAddress) = if ((customRound == 0)) | |
83 | 83 | then { | |
84 | 84 | let currentRound = match getInteger(this, (callerAddress + "_round")) { | |
85 | 85 | case a: Int => | |
86 | 86 | a | |
87 | 87 | case _ => | |
88 | 88 | throw("Unable to find the round") | |
89 | 89 | } | |
90 | 90 | currentRound | |
91 | 91 | } | |
92 | 92 | else customRound | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | @Callable(i) | |
96 | 96 | func bet (normalBet,tieBet) = { | |
97 | 97 | let callerAddress = toBase58String(i.caller.bytes) | |
98 | 98 | let p = getPayments(i) | |
99 | 99 | let currentRound = match getInteger(this, (callerAddress + "_round")) { | |
100 | 100 | case a: Int => | |
101 | 101 | (a + 1) | |
102 | 102 | case _ => | |
103 | 103 | 1 | |
104 | 104 | } | |
105 | 105 | let round = ((callerAddress + "_") + toString(currentRound)) | |
106 | 106 | if (isDefined(getBoolean(this, (round + "_stop")))) | |
107 | 107 | then throw("This round is already played") | |
108 | 108 | else if (isDefined(getString(this, round))) | |
109 | 109 | then throw("You cannot bet on this game") | |
110 | 110 | else if ((p != (normalBet + tieBet))) | |
111 | 111 | then throw("normal bet + tie bet should be equal to the payment") | |
112 | 112 | else if ((p > maxBet)) | |
113 | 113 | then throw(("The bet needs to be lower or equal than " + toString(maxBet))) | |
114 | 114 | else { | |
115 | 115 | let availableProp = (round + "_deck") | |
116 | 116 | let avDeck = getAvailableDeck(this, availableProp) | |
117 | - | let $ | |
118 | - | let cardPlayer = $ | |
119 | - | let cardPositionPlayer = $ | |
120 | - | let avDeck1 = $ | |
121 | - | let $ | |
122 | - | let cardCasino = $ | |
123 | - | let cardPositionCasino = $ | |
124 | - | let avDeck2 = $ | |
117 | + | let $t037843904 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck) | |
118 | + | let cardPlayer = $t037843904._1 | |
119 | + | let cardPositionPlayer = $t037843904._2 | |
120 | + | let avDeck1 = $t037843904._3 | |
121 | + | let $t039094030 = getPlayerCardAndPositionAndUpdateDeck(i, toString(currentRound), avDeck1) | |
122 | + | let cardCasino = $t039094030._1 | |
123 | + | let cardPositionCasino = $t039094030._2 | |
124 | + | let avDeck2 = $t039094030._3 | |
125 | 125 | if ((getCardValue(cardPlayer) == getCardValue(cardCasino))) | |
126 | 126 | then { | |
127 | 127 | let currentDraws = 1 | |
128 | 128 | if ((tieBet != 0)) | |
129 | 129 | then [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), BooleanEntry(round, true), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), normalBet), ScriptTransfer(i.caller, (((tieBet * 10) + tieBet) + i.fee), unit), IntegerEntry((round + "_initialFee"), i.fee)] | |
130 | 130 | else [StringEntry(availableProp, makeString(avDeck2, separator)), IntegerEntry((callerAddress + "_round"), currentRound), BooleanEntry(round, true), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws), IntegerEntry((round + "_betAmount"), normalBet), IntegerEntry((round + "_initialFee"), i.fee)] | |
131 | 131 | } | |
132 | 132 | else if (isPlayerWinner(cardPlayer, cardCasino)) | |
133 | 133 | then [StringEntry(availableProp, makeString(avDeck2, separator)), BooleanEntry(round, true), IntegerEntry((callerAddress + "_round"), currentRound), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), normalBet), IntegerEntry((round + "_initialFee"), i.fee), ScriptTransfer(i.caller, (normalBet + i.fee), unit), BooleanEntry((round + "_stop"), true)] | |
134 | 134 | else [StringEntry(availableProp, makeString(avDeck2, separator)), BooleanEntry(round, true), IntegerEntry((callerAddress + "_round"), currentRound), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_betAmount"), normalBet), IntegerEntry((round + "_initialFee"), i.fee), BooleanEntry((round + "_stop"), true)] | |
135 | 135 | } | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | ||
140 | 140 | @Callable(i) | |
141 | 141 | func surrender (customRound) = { | |
142 | 142 | let callerAddress = toBase58String(i.caller.bytes) | |
143 | 143 | let roundToUse = getCurrentRound(customRound, callerAddress) | |
144 | 144 | let round = ((callerAddress + "_") + toString(roundToUse)) | |
145 | 145 | if (!(isDefined(getBoolean(this, round)))) | |
146 | 146 | then throw("This round is not played") | |
147 | 147 | else if (isDefined(getBoolean(this, (round + "_stop")))) | |
148 | 148 | then throw("This round is already played") | |
149 | 149 | else if (!(isDefined(getInteger(this, (round + "_drawSequence"))))) | |
150 | 150 | then throw("This game is not on war") | |
151 | 151 | else { | |
152 | 152 | let betAmount = match getInteger(this, (round + "_betAmount")) { | |
153 | 153 | case a: Int => | |
154 | 154 | a | |
155 | 155 | case _ => | |
156 | 156 | throw("Unable to find original bet amount") | |
157 | 157 | } | |
158 | 158 | let f = getFee((round + "_initialFee")) | |
159 | 159 | [ScriptTransfer(i.caller, ((betAmount / 2) + f), unit), BooleanEntry((round + "_stop"), true)] | |
160 | 160 | } | |
161 | 161 | } | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | ||
165 | 165 | @Callable(i) | |
166 | 166 | func goToWar (customRound) = { | |
167 | 167 | let callerAddress = toBase58String(i.caller.bytes) | |
168 | 168 | let roundToUse = getCurrentRound(customRound, callerAddress) | |
169 | 169 | let round = ((callerAddress + "_") + toString(roundToUse)) | |
170 | 170 | if (!(isDefined(getBoolean(this, round)))) | |
171 | 171 | then throw("This round is not played") | |
172 | 172 | else if (isDefined(getBoolean(this, (round + "_stop")))) | |
173 | 173 | then throw("This round is already played") | |
174 | 174 | else if (!(isDefined(getInteger(this, (round + "_drawSequence"))))) | |
175 | 175 | then throw("This game is not on war") | |
176 | 176 | else { | |
177 | 177 | let betAmount = match getInteger(this, (round + "_betAmount")) { | |
178 | 178 | case a: Int => | |
179 | 179 | a | |
180 | 180 | case _ => | |
181 | 181 | throw("Unable to find original bet amount") | |
182 | 182 | } | |
183 | 183 | let p = getPayments(i) | |
184 | 184 | let f = getFee((round + "_initialFee")) | |
185 | 185 | if ((p != betAmount)) | |
186 | 186 | then throw((((("original bet amount (" + toString(betAmount)) + ") different to the current payment (") + toString(p)) + ")")) | |
187 | 187 | else { | |
188 | 188 | let availableProp = (round + "_deck") | |
189 | 189 | let avDeck = getAvailableDeck(this, availableProp) | |
190 | - | let $ | |
191 | - | let burned1 = $ | |
192 | - | let burnedPos1 = $ | |
193 | - | let burnedDeck1 = $ | |
194 | - | let $ | |
195 | - | let burned2 = $ | |
196 | - | let burnedPos2 = $ | |
197 | - | let burnedDeck2 = $ | |
198 | - | let $ | |
199 | - | let burned3 = $ | |
200 | - | let burnedPos3 = $ | |
201 | - | let burnedDeck3 = $ | |
202 | - | let $ | |
203 | - | let cardPlayer = $ | |
204 | - | let cardPositionPlayer = $ | |
205 | - | let avDeck1 = $ | |
206 | - | let $ | |
207 | - | let cardCasino = $ | |
208 | - | let cardPositionCasino = $ | |
209 | - | let avDeck2 = $ | |
190 | + | let $t090039114 = getPlayerCardAndPositionAndUpdateDeck(i, toString(roundToUse), avDeck) | |
191 | + | let burned1 = $t090039114._1 | |
192 | + | let burnedPos1 = $t090039114._2 | |
193 | + | let burnedDeck1 = $t090039114._3 | |
194 | + | let $t091279253 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned1), burnedDeck1) | |
195 | + | let burned2 = $t091279253._1 | |
196 | + | let burnedPos2 = $t091279253._2 | |
197 | + | let burnedDeck2 = $t091279253._3 | |
198 | + | let $t092669392 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned2), burnedDeck2) | |
199 | + | let burned3 = $t092669392._1 | |
200 | + | let burnedPos3 = $t092669392._2 | |
201 | + | let burnedDeck3 = $t092669392._3 | |
202 | + | let $t094059538 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + burned3), burnedDeck3) | |
203 | + | let cardPlayer = $t094059538._1 | |
204 | + | let cardPositionPlayer = $t094059538._2 | |
205 | + | let avDeck1 = $t094059538._3 | |
206 | + | let $t095519683 = getPlayerCardAndPositionAndUpdateDeck(i, (toString(roundToUse) + cardPlayer), avDeck1) | |
207 | + | let cardCasino = $t095519683._1 | |
208 | + | let cardPositionCasino = $t095519683._2 | |
209 | + | let avDeck2 = $t095519683._3 | |
210 | 210 | if ((getCardValue(cardPlayer) == getCardValue(cardCasino))) | |
211 | 211 | then { | |
212 | 212 | let currentDraws = match getInteger(this, (round + "_drawSequence")) { | |
213 | 213 | case a: Int => | |
214 | 214 | (a + 1) | |
215 | 215 | case _ => | |
216 | 216 | 0 | |
217 | 217 | } | |
218 | 218 | [StringEntry(availableProp, makeString(avDeck2, separator)), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), IntegerEntry((round + "_drawSequence"), currentDraws)] | |
219 | 219 | } | |
220 | 220 | else if (isPlayerWinner(cardPlayer, cardCasino)) | |
221 | 221 | then [StringEntry(availableProp, makeString(avDeck2, separator)), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), ScriptTransfer(i.caller, (p + f), unit), BooleanEntry((round + "_stop"), true)] | |
222 | 222 | else [StringEntry(availableProp, makeString(avDeck2, separator)), StringEntry((round + "_playerCard"), cardPlayer), StringEntry((round + "_casinoCard"), cardCasino), BooleanEntry((round + "_stop"), true)] | |
223 | 223 | } | |
224 | 224 | } | |
225 | 225 | } | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | @Verifier(tx) | |
229 | 229 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
230 | 230 |
github/deemru/w8io/026f985 51.48 ms ◑