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