tx · SPqetXGRipro9J8gFUUwvLjRGBWDRrTpZY4e6uSDfgY 3Mr1J95HgTFuj93Uh61WS1PBrxc5hSx5uE5: -0.05000000 Waves 2024.07.17 14:29 [3197981] smart account 3Mr1J95HgTFuj93Uh61WS1PBrxc5hSx5uE5 > SELF 0.00000000 Waves
{ "type": 13, "id": "SPqetXGRipro9J8gFUUwvLjRGBWDRrTpZY4e6uSDfgY", "fee": 5000000, "feeAssetId": null, "timestamp": 1721215840998, "version": 2, "chainId": 84, "sender": "3Mr1J95HgTFuj93Uh61WS1PBrxc5hSx5uE5", "senderPublicKey": "DhKSnv34wE65np8uDd8E6ygEbNsn6fHx9p7q4hJTcgRw", "proofs": [ "64SnsS9mRVhSr9RhAfUdP5bHndhNo5UQLmBfr5krro3K4zuFj2n9zUFQkKDz8G88A7jxdYnF7U6JJe9MuuQN7oBq" ], "script": "base64:AAIFAAAAAAAAAA0IAhIDCgEIEgQKAggIAAAACAAAAAAMQkFJX0NPTlRSQUNUAgAAACMzTjl0S2l4enFUWVduRVhReHJEUTVwQlRHdlFkNnNGc3ZtVgAAAAAMQkFJX0FTU0VUX0lEAQAAACCT4XI4cQSbauiaYx8EJLdkU5csPrxmC4N0r2i7JI3iQgAAAAAGUExBWUVSAgAAAAExAAAAAAJBSQIAAAABMgAAAAAOV0lOTklOR19BTU9VTlQAAAAAAAX14QABAAAABmNoYXJBdAAAAAIAAAADc3RyAAAAAWkJAAGRAAAAAgkABLUAAAACBQAAAANzdHICAAAAAAUAAAABaQEAAAASY2hlY2tJZk1vdmVJc1ZhbGlkAAAAAgAAAAZnYW1lSWQAAAAFYm9hcmQEAAAADGN1cnJlbnRCb2FyZAQAAAAHJG1hdGNoMAkABCIAAAABCQABLAAAAAICAAAADWN1cnJlbnRCb2FyZF8FAAAABmdhbWVJZAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFzBQAAAAckbWF0Y2gwBQAAAAFzAgAAAAkwMDAwMDAwMDAEAA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2FyZF8FAAAABmdhbWVJZAUAAAAFYm9hcmQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACAgAAAAd3aW5uZXJfBQAAAAZnYW1lSWQCAAAABnBsYXllcgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAZzZW5kZXIFAAAADldJTk5JTkdfQU1PVU5UBQAAAAxCQUlfQVNTRVRfSUQFAAAAA25pbAQAAAAIbmV4dE1vdmUJAAP8AAAABAkBAAAAB0FkZHJlc3MAAAABCQACWQAAAAEFAAAADEJBSV9DT05UUkFDVAIAAAAUcmVnaXN0ZXJUYXNrQ2FsbGJhY2sJAARMAAAAAgkAASwAAAACCQABLAAAAAIFAAAABmdhbWVJZAIAAAABXwUAAAAFYm9hcmQJAARMAAAAAgIAAAAJdGljdGFjdG9lCQAETAAAAAICAAAACGNhbGxiYWNrBQAAAANuaWwJAARMAAAAAgkBAAAAD0F0dGFjaGVkUGF5bWVudAAAAAIFAAAADEJBSV9BU1NFVF9JRAAAAAAAAJiWgAUAAAADbmlsCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgIAAAANY3VycmVudEJvYXJkXwUAAAAGZ2FtZUlkBQAAAAVib2FyZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAICAAAACmluaXRpYXRvcl8FAAAABmdhbWVJZAkABCUAAAABBQAAAAZzZW5kZXIFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5eizZ2Q==", "height": 3197981, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: XN8VUsQTzJD3rebUGQKm5yyp1mV3W1pL2ee3F2JmB2s Next: BjhesTfFhPwSt7kshZq4BieM3G6R2TG9aPpRDGphDKxK Diff:
Old | New | Differences | |
---|---|---|---|
111 | 111 | then ninthPositionCorrect | |
112 | 112 | else false | |
113 | 113 | let countMoves = ((((((((firstSelected + secondSelected) + thirdSelected) + fourthSelected) + fifthSelected) + sixthSelected) + seventhSelected) + eighthSelected) + ninthSelected) | |
114 | - | let onlyOneMove = ( | |
114 | + | let onlyOneMove = (1 >= countMoves) | |
115 | 115 | if (noOldPositionOverwritten) | |
116 | 116 | then onlyOneMove | |
117 | 117 | else false |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let BAI_CONTRACT = "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV" | |
5 | 5 | ||
6 | 6 | let BAI_ASSET_ID = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1' | |
7 | 7 | ||
8 | 8 | let PLAYER = "1" | |
9 | 9 | ||
10 | 10 | let AI = "2" | |
11 | 11 | ||
12 | 12 | let WINNING_AMOUNT = 100000000 | |
13 | 13 | ||
14 | 14 | func charAt (str,i) = split(str, "")[i] | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func checkIfMoveIsValid (gameId,board) = { | |
18 | 18 | let currentBoard = match getString(("currentBoard_" + gameId)) { | |
19 | 19 | case s: String => | |
20 | 20 | s | |
21 | 21 | case _ => | |
22 | 22 | "000000000" | |
23 | 23 | } | |
24 | 24 | let firstSelected = if ((charAt(board, 0) != charAt(currentBoard, 0))) | |
25 | 25 | then 1 | |
26 | 26 | else 0 | |
27 | 27 | let secondSelected = if ((charAt(board, 1) != charAt(currentBoard, 1))) | |
28 | 28 | then 1 | |
29 | 29 | else 0 | |
30 | 30 | let thirdSelected = if ((charAt(board, 2) != charAt(currentBoard, 2))) | |
31 | 31 | then 1 | |
32 | 32 | else 0 | |
33 | 33 | let fourthSelected = if ((charAt(board, 3) != charAt(currentBoard, 3))) | |
34 | 34 | then 1 | |
35 | 35 | else 0 | |
36 | 36 | let fifthSelected = if ((charAt(board, 4) != charAt(currentBoard, 4))) | |
37 | 37 | then 1 | |
38 | 38 | else 0 | |
39 | 39 | let sixthSelected = if ((charAt(board, 5) != charAt(currentBoard, 5))) | |
40 | 40 | then 1 | |
41 | 41 | else 0 | |
42 | 42 | let seventhSelected = if ((charAt(board, 6) != charAt(currentBoard, 6))) | |
43 | 43 | then 1 | |
44 | 44 | else 0 | |
45 | 45 | let eighthSelected = if ((charAt(board, 7) != charAt(currentBoard, 7))) | |
46 | 46 | then 1 | |
47 | 47 | else 0 | |
48 | 48 | let ninthSelected = if ((charAt(board, 8) != charAt(currentBoard, 8))) | |
49 | 49 | then 1 | |
50 | 50 | else 0 | |
51 | 51 | let firstPositionCorrect = if (if ((charAt(board, 0) == charAt(currentBoard, 0))) | |
52 | 52 | then true | |
53 | 53 | else (charAt(board, 0) == "0")) | |
54 | 54 | then true | |
55 | 55 | else false | |
56 | 56 | let secondPositionCorrect = if (if ((charAt(board, 1) == charAt(currentBoard, 1))) | |
57 | 57 | then true | |
58 | 58 | else (charAt(board, 1) == "0")) | |
59 | 59 | then true | |
60 | 60 | else false | |
61 | 61 | let thirdPositionCorrect = if (if ((charAt(board, 2) == charAt(currentBoard, 2))) | |
62 | 62 | then true | |
63 | 63 | else (charAt(board, 2) == "0")) | |
64 | 64 | then true | |
65 | 65 | else false | |
66 | 66 | let fourthPositionCorrect = if (if ((charAt(board, 3) == charAt(currentBoard, 3))) | |
67 | 67 | then true | |
68 | 68 | else (charAt(board, 3) == "0")) | |
69 | 69 | then true | |
70 | 70 | else false | |
71 | 71 | let fifthPositionCorrect = if (if ((charAt(board, 4) == charAt(currentBoard, 4))) | |
72 | 72 | then true | |
73 | 73 | else (charAt(board, 4) == "0")) | |
74 | 74 | then true | |
75 | 75 | else false | |
76 | 76 | let sixthPositionCorrect = if (if ((charAt(board, 5) == charAt(currentBoard, 5))) | |
77 | 77 | then true | |
78 | 78 | else (charAt(board, 5) == "0")) | |
79 | 79 | then true | |
80 | 80 | else false | |
81 | 81 | let seventhPositionCorrect = if (if ((charAt(board, 6) == charAt(currentBoard, 6))) | |
82 | 82 | then true | |
83 | 83 | else (charAt(board, 6) == "0")) | |
84 | 84 | then true | |
85 | 85 | else false | |
86 | 86 | let eighthPositionCorrect = if (if ((charAt(board, 7) == charAt(currentBoard, 7))) | |
87 | 87 | then true | |
88 | 88 | else (charAt(board, 7) == "0")) | |
89 | 89 | then true | |
90 | 90 | else false | |
91 | 91 | let ninthPositionCorrect = if (if ((charAt(board, 8) == charAt(currentBoard, 8))) | |
92 | 92 | then true | |
93 | 93 | else (charAt(board, 8) == "0")) | |
94 | 94 | then true | |
95 | 95 | else false | |
96 | 96 | let noOldPositionOverwritten = if (if (if (if (if (if (if (if (firstPositionCorrect) | |
97 | 97 | then secondPositionCorrect | |
98 | 98 | else false) | |
99 | 99 | then thirdPositionCorrect | |
100 | 100 | else false) | |
101 | 101 | then fourthPositionCorrect | |
102 | 102 | else false) | |
103 | 103 | then fifthPositionCorrect | |
104 | 104 | else false) | |
105 | 105 | then sixthPositionCorrect | |
106 | 106 | else false) | |
107 | 107 | then seventhPositionCorrect | |
108 | 108 | else false) | |
109 | 109 | then eighthPositionCorrect | |
110 | 110 | else false) | |
111 | 111 | then ninthPositionCorrect | |
112 | 112 | else false | |
113 | 113 | let countMoves = ((((((((firstSelected + secondSelected) + thirdSelected) + fourthSelected) + fifthSelected) + sixthSelected) + seventhSelected) + eighthSelected) + ninthSelected) | |
114 | - | let onlyOneMove = ( | |
114 | + | let onlyOneMove = (1 >= countMoves) | |
115 | 115 | if (noOldPositionOverwritten) | |
116 | 116 | then onlyOneMove | |
117 | 117 | else false | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func checkIfPlayerHasWon (gameId,board,player) = { | |
122 | 122 | let currentBoard = match getString(("currentBoard_" + gameId)) { | |
123 | 123 | case s: String => | |
124 | 124 | s | |
125 | 125 | case _ => | |
126 | 126 | "000000000" | |
127 | 127 | } | |
128 | 128 | let winningCombinations = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6]] | |
129 | 129 | let topRow = if (if ((charAt(currentBoard, winningCombinations[0][0]) == player)) | |
130 | 130 | then (charAt(currentBoard, winningCombinations[0][1]) == player) | |
131 | 131 | else false) | |
132 | 132 | then (charAt(currentBoard, winningCombinations[0][2]) == player) | |
133 | 133 | else false | |
134 | 134 | let middleRow = if (if ((charAt(currentBoard, winningCombinations[1][0]) == player)) | |
135 | 135 | then (charAt(currentBoard, winningCombinations[1][1]) == player) | |
136 | 136 | else false) | |
137 | 137 | then (charAt(currentBoard, winningCombinations[1][2]) == player) | |
138 | 138 | else false | |
139 | 139 | let bottomRow = if (if ((charAt(currentBoard, winningCombinations[2][0]) == player)) | |
140 | 140 | then (charAt(currentBoard, winningCombinations[2][1]) == player) | |
141 | 141 | else false) | |
142 | 142 | then (charAt(currentBoard, winningCombinations[2][2]) == player) | |
143 | 143 | else false | |
144 | 144 | let leftColumn = if (if ((charAt(currentBoard, winningCombinations[3][0]) == player)) | |
145 | 145 | then (charAt(currentBoard, winningCombinations[3][1]) == player) | |
146 | 146 | else false) | |
147 | 147 | then (charAt(currentBoard, winningCombinations[3][2]) == player) | |
148 | 148 | else false | |
149 | 149 | let middleColumn = if (if ((charAt(currentBoard, winningCombinations[4][0]) == player)) | |
150 | 150 | then (charAt(currentBoard, winningCombinations[4][1]) == player) | |
151 | 151 | else false) | |
152 | 152 | then (charAt(currentBoard, winningCombinations[4][2]) == player) | |
153 | 153 | else false | |
154 | 154 | let rightColumn = if (if ((charAt(currentBoard, winningCombinations[5][0]) == player)) | |
155 | 155 | then (charAt(currentBoard, winningCombinations[5][1]) == player) | |
156 | 156 | else false) | |
157 | 157 | then (charAt(currentBoard, winningCombinations[5][2]) == player) | |
158 | 158 | else false | |
159 | 159 | let diagonalOne = if (if ((charAt(currentBoard, winningCombinations[6][0]) == player)) | |
160 | 160 | then (charAt(currentBoard, winningCombinations[6][1]) == player) | |
161 | 161 | else false) | |
162 | 162 | then (charAt(currentBoard, winningCombinations[6][2]) == player) | |
163 | 163 | else false | |
164 | 164 | let diagonalTwo = if (if ((charAt(currentBoard, winningCombinations[7][0]) == player)) | |
165 | 165 | then (charAt(currentBoard, winningCombinations[7][1]) == player) | |
166 | 166 | else false) | |
167 | 167 | then (charAt(currentBoard, winningCombinations[7][2]) == player) | |
168 | 168 | else false | |
169 | 169 | if (if (if (if (if (if (if (topRow) | |
170 | 170 | then true | |
171 | 171 | else middleRow) | |
172 | 172 | then true | |
173 | 173 | else bottomRow) | |
174 | 174 | then true | |
175 | 175 | else leftColumn) | |
176 | 176 | then true | |
177 | 177 | else middleRow) | |
178 | 178 | then true | |
179 | 179 | else rightColumn) | |
180 | 180 | then true | |
181 | 181 | else diagonalOne) | |
182 | 182 | then true | |
183 | 183 | else diagonalTwo | |
184 | 184 | } | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | @Callable(i) | |
188 | 188 | func callback (gameIdAndBoard) = { | |
189 | 189 | let parts = split(gameIdAndBoard, "_") | |
190 | 190 | let gameId = parts[0] | |
191 | 191 | let board = parts[1] | |
192 | 192 | let moveOfAIIsValid = checkIfMoveIsValid(gameId, board) | |
193 | 193 | if (!(moveOfAIIsValid)) | |
194 | 194 | then throw("Illegal move!") | |
195 | 195 | else { | |
196 | 196 | let aiHasWon = checkIfPlayerHasWon(gameId, board, AI) | |
197 | 197 | if (aiHasWon) | |
198 | 198 | then [StringEntry(("currentBoard_" + gameId), board), StringEntry(("winner_" + gameId), "ai")] | |
199 | 199 | else [StringEntry(("currentBoard_" + gameId), board)] | |
200 | 200 | } | |
201 | 201 | } | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | ||
205 | 205 | @Callable(i) | |
206 | 206 | func playTTT (game,board) = { | |
207 | 207 | let numberOfPayments = size(i.payments) | |
208 | 208 | if ((numberOfPayments != 1)) | |
209 | 209 | then throw("Payment necessary!") | |
210 | 210 | else { | |
211 | 211 | let payment = i.payments[0] | |
212 | 212 | let fee = payment.amount | |
213 | 213 | let feeAssetId = payment.assetId | |
214 | 214 | let minFee = match getInteger(Address(fromBase58String(BAI_CONTRACT)), "price_tictactoe") { | |
215 | 215 | case n: Int => | |
216 | 216 | n | |
217 | 217 | case _ => | |
218 | 218 | 0 | |
219 | 219 | } | |
220 | 220 | if (if ((feeAssetId != BAI_ASSET_ID)) | |
221 | 221 | then true | |
222 | 222 | else (minFee > fee)) | |
223 | 223 | then throw("Payment of the minimal BAI amount necessary!") | |
224 | 224 | else { | |
225 | 225 | let sender = i.caller | |
226 | 226 | let gameId = if ((size(game) == 0)) | |
227 | 227 | then toBase58String(i.transactionId) | |
228 | 228 | else game | |
229 | 229 | let currentBoard = match getString(("currentBoard_" + gameId)) { | |
230 | 230 | case s: String => | |
231 | 231 | s | |
232 | 232 | case _ => | |
233 | 233 | board | |
234 | 234 | } | |
235 | 235 | let initiator = match getString(("initiator_" + gameId)) { | |
236 | 236 | case s: String => | |
237 | 237 | s | |
238 | 238 | case _ => | |
239 | 239 | sender | |
240 | 240 | } | |
241 | 241 | if ((sender != initiator)) | |
242 | 242 | then throw("Only initiator is allowed to make moves!") | |
243 | 243 | else { | |
244 | 244 | let moveOfPlayerIsValid = checkIfMoveIsValid(gameId, board) | |
245 | 245 | if (!(moveOfPlayerIsValid)) | |
246 | 246 | then throw("Illegal move!") | |
247 | 247 | else { | |
248 | 248 | let playerHasWon = checkIfPlayerHasWon(gameId, board, PLAYER) | |
249 | 249 | if (playerHasWon) | |
250 | 250 | then [StringEntry(("currentBoard_" + gameId), board), StringEntry(("winner_" + gameId), "player"), ScriptTransfer(sender, WINNING_AMOUNT, BAI_ASSET_ID)] | |
251 | 251 | else { | |
252 | 252 | let nextMove = invoke(Address(fromBase58String(BAI_CONTRACT)), "registerTaskCallback", [((gameId + "_") + board), "tictactoe", "callback"], [AttachedPayment(BAI_ASSET_ID, 10000000)]) | |
253 | 253 | [StringEntry(("currentBoard_" + gameId), board), StringEntry(("initiator_" + gameId), toString(sender))] | |
254 | 254 | } | |
255 | 255 | } | |
256 | 256 | } | |
257 | 257 | } | |
258 | 258 | } | |
259 | 259 | } | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | @Verifier(tx) | |
263 | 263 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
264 | 264 |
github/deemru/w8io/026f985 39.52 ms ◑