tx · EKM6fzSwf9RgVHNux8qUVhbAQwyiBJRvhmxAUBcPEf1W 3MsHkgNdxBJg9SEFvbYyf69SP75SNJnatPk: -0.04000000 Waves 2020.08.06 13:26 [1120429] smart account 3MsHkgNdxBJg9SEFvbYyf69SP75SNJnatPk > SELF 0.00000000 Waves
{ "type": 13, "id": "EKM6fzSwf9RgVHNux8qUVhbAQwyiBJRvhmxAUBcPEf1W", "fee": 4000000, "feeAssetId": null, "timestamp": 1596709633283, "version": 1, "sender": "3MsHkgNdxBJg9SEFvbYyf69SP75SNJnatPk", "senderPublicKey": "8Ko3jocxxhmjmdtwfEBZsmgNZpuBgqdpq5GPXiUMASrL", "proofs": [ "4a8LJzo6eiExRAboEjQGvo8jYKHofrJt7RmjrLPfv2KHbQjJQNexwMFVDZdkPr4nuJXhT3nMD982CdpbFTerQA7V" ], "script": "base64:AAIDAAAAAAAAABkIARIECgIBARIFCgMBAQESABIECgIBARIAAAAADAEAAAAJc2V0Q29vcmRzAAAAAwAAAANrZXkAAAAIbGF0aXR1ZGUAAAAJbG9uZ2l0dWRlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAADHBvc2l0aW9uTGF0XwUAAAADa2V5BQAAAAhsYXRpdHVkZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAAxwb3NpdGlvbkxvbl8FAAAAA2tleQUAAAAJbG9uZ2l0dWRlBQAAAANuaWwBAAAAC3NldEdhbWVEYXRhAAAAAgAAAAlwbGF5ZXJLZXkAAAALb3Bwb25lbnRLZXkEAAAABmdhbWVJZAkAASwAAAACCQABLAAAAAIFAAAACXBsYXllcktleQIAAAABXwUAAAALb3Bwb25lbnRLZXkJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgIAAAAHZ2FtZUlkXwUAAAAJcGxheWVyS2V5BQAAAAZnYW1lSWQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAg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AAAACURhdGFFbnRyeQAAAAICAAAABUF0YW4wBQAAAAVhdGFuMAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAFQXRhbjUFAAAABWF0YW41CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAZBdGFuMTAFAAAABmF0YW4xMAUAAAADbmlsAAAAAHiZ5Vg=", "chainId": 84, "height": 1120429, "spentComplexity": 0 } View: original | compacted Prev: DCxBzTvNLD5fDUqJTNXAVSPgcxUDuTSifhMiSsCYVkwn Next: kmyEhRaApFKUfuE7t4VzUF9vFL3WQXbryRsCGekSmTx Diff:
Old | New | Differences | |
---|---|---|---|
261 | 261 | let atanN10 = atan(-1000000) | |
262 | 262 | let atanN5 = atan(-500000) | |
263 | 263 | let atan0 = atan(0) | |
264 | - | WriteSet([DataEntry("SinN180", sinN180), DataEntry("SinN90", sinN90), DataEntry("SinN45", sinN45), DataEntry("Sin0", sin0), DataEntry("Sin45", sin45), DataEntry("Sin90", sin90), DataEntry("Sin180", sin180), DataEntry("Sin270", sin270), DataEntry("CosN180", cosN180), DataEntry("CosN90", cosN90), DataEntry("CosN45", cosN45), DataEntry("Cos0", cos0), DataEntry("Cos45", cos45), DataEntry("Cos90", cos90), DataEntry("Cos180", cos180), DataEntry("Cos270", cos270), DataEntry("AsinN1", asinN1), DataEntry("AsinN5", asinN5), DataEntry("Asin0", asin0), DataEntry("Asin1", asin1), DataEntry("Asin5", asin5), DataEntry("AtanN10", atanN10), DataEntry("AtanN5", atanN5), DataEntry("Atan0", atan0)]) | |
264 | + | let atan5 = atan(500000) | |
265 | + | let atan10 = atan(1000000) | |
266 | + | WriteSet([DataEntry("SinN180", sinN180), DataEntry("SinN90", sinN90), DataEntry("SinN45", sinN45), DataEntry("Sin0", sin0), DataEntry("Sin45", sin45), DataEntry("Sin90", sin90), DataEntry("Sin180", sin180), DataEntry("Sin270", sin270), DataEntry("CosN180", cosN180), DataEntry("CosN90", cosN90), DataEntry("CosN45", cosN45), DataEntry("Cos0", cos0), DataEntry("Cos45", cos45), DataEntry("Cos90", cos90), DataEntry("Cos180", cos180), DataEntry("Cos270", cos270), DataEntry("AsinN1", asinN1), DataEntry("AsinN5", asinN5), DataEntry("Asin0", asin0), DataEntry("Asin1", asin1), DataEntry("Asin5", asin5), DataEntry("AtanN10", atanN10), DataEntry("AtanN5", atanN5), DataEntry("Atan0", atan0), DataEntry("Atan5", atan5), DataEntry("Atan10", atan10)]) | |
265 | 267 | } | |
266 | 268 | ||
267 | 269 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func setCoords (key,latitude,longitude) = [DataEntry(("positionLat_" + key), latitude), DataEntry(("positionLon_" + key), longitude)] | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func setGameData (playerKey,opponentKey) = { | |
8 | 8 | let gameId = ((playerKey + "_") + opponentKey) | |
9 | 9 | [DataEntry(("gameId_" + playerKey), gameId), DataEntry(("opponent_" + playerKey), opponentKey), DataEntry(("gameId_" + opponentKey), gameId), DataEntry(("opponent_" + opponentKey), playerKey), DataEntry(("game_" + gameId), true), DataEntry(("gameTurn_" + gameId), playerKey), DataEntry(("gameWinner_" + gameId), "")] | |
10 | 10 | } | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func getGameId (key) = getStringValue(this, ("gameId_" + key)) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func sin (rad) = { | |
17 | 17 | let factor = (rad / 628318) | |
18 | 18 | if ((0 > rad)) | |
19 | 19 | then { | |
20 | 20 | let positive = -(rad) | |
21 | 21 | if ((positive > 628318)) | |
22 | 22 | then { | |
23 | 23 | let norm = (positive + (factor * 628318)) | |
24 | 24 | if ((norm > 314159)) | |
25 | 25 | then { | |
26 | 26 | let norm2 = (norm - 314159) | |
27 | 27 | let a = ((16 * norm2) * (314159 - norm2)) | |
28 | 28 | let b = (493480220050 - (a / 4)) | |
29 | 29 | ((a * 100000) / b) | |
30 | 30 | } | |
31 | 31 | else { | |
32 | 32 | let a = ((16 * norm) * (314159 - norm)) | |
33 | 33 | let b = (493480220050 - (a / 4)) | |
34 | 34 | ((-(a) * 100000) / b) | |
35 | 35 | } | |
36 | 36 | } | |
37 | 37 | else if ((positive > 314159)) | |
38 | 38 | then { | |
39 | 39 | let norm = (positive - 314159) | |
40 | 40 | let a = ((16 * norm) * (314159 - norm)) | |
41 | 41 | let b = (493480220050 - (a / 4)) | |
42 | 42 | ((a * 100000) / b) | |
43 | 43 | } | |
44 | 44 | else { | |
45 | 45 | let a = ((16 * positive) * (314159 - positive)) | |
46 | 46 | let b = (493480220050 - (a / 4)) | |
47 | 47 | ((-(a) * 100000) / b) | |
48 | 48 | } | |
49 | 49 | } | |
50 | 50 | else if ((rad > 628318)) | |
51 | 51 | then { | |
52 | 52 | let norm = (rad - (factor * 628318)) | |
53 | 53 | if ((norm > 314159)) | |
54 | 54 | then { | |
55 | 55 | let norm2 = (norm - 314159) | |
56 | 56 | let a = ((16 * norm2) * (314159 - norm2)) | |
57 | 57 | let b = (493480220050 - (a / 4)) | |
58 | 58 | ((-(a) * 100000) / b) | |
59 | 59 | } | |
60 | 60 | else { | |
61 | 61 | let a = ((16 * norm) * (314159 - norm)) | |
62 | 62 | let b = (493480220050 - (a / 4)) | |
63 | 63 | ((a * 100000) / b) | |
64 | 64 | } | |
65 | 65 | } | |
66 | 66 | else if ((rad > 314159)) | |
67 | 67 | then { | |
68 | 68 | let norm = (rad - 314159) | |
69 | 69 | let a = ((16 * norm) * (314159 - norm)) | |
70 | 70 | let b = (493480220050 - (a / 4)) | |
71 | 71 | ((-(a) * 100000) / b) | |
72 | 72 | } | |
73 | 73 | else { | |
74 | 74 | let a = ((16 * rad) * (314159 - rad)) | |
75 | 75 | let b = (493480220050 - (a / 4)) | |
76 | 76 | ((a * 100000) / b) | |
77 | 77 | } | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func cos (rad) = sin((157079 - rad)) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func asin (x) = if ((0 > x)) | |
85 | 85 | then { | |
86 | 86 | let x1 = (-1 * x) | |
87 | 87 | let val2 = (((-1873 * x1) / 100000) + 7426) | |
88 | 88 | let val4 = (((val2 * x1) / 100000) - 21211) | |
89 | 89 | let val6 = (((val4 * x1) / 100000) + 157072) | |
90 | 90 | let root = pow((100000 - x), 5, 5, 1, 5, HALFEVEN) | |
91 | 91 | -((157080 - ((root * val6) / 100000))) | |
92 | 92 | } | |
93 | 93 | else { | |
94 | 94 | let val2 = (((-1873 * x) / 100000) + 7426) | |
95 | 95 | let val4 = (((val2 * x) / 100000) - 21211) | |
96 | 96 | let val6 = (((val4 * x) / 100000) + 157072) | |
97 | 97 | let root = pow((100000 - x), 5, 5, 1, 5, HALFEVEN) | |
98 | 98 | (157080 - ((root * val6) / 100000)) | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func atan (x) = { | |
103 | 103 | let xPow2 = ((x * x) / 100000) | |
104 | 104 | if ((-100000 > x)) | |
105 | 105 | then (-157079 - ((x * 100000) / (xPow2 + 28000))) | |
106 | 106 | else if ((x > 100000)) | |
107 | 107 | then (157079 - ((x * 100000) / (xPow2 + 28000))) | |
108 | 108 | else ((x * 100000) / (100000 + ((28000 * xPow2) / 100000))) | |
109 | 109 | } | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func atan2 (y,x) = if ((x > 0)) | |
113 | 113 | then atan((y / x)) | |
114 | 114 | else if (if ((0 > x)) | |
115 | 115 | then (y >= 0) | |
116 | 116 | else false) | |
117 | 117 | then (atan((y / x)) + 314159) | |
118 | 118 | else if (if ((0 > x)) | |
119 | 119 | then (0 > y) | |
120 | 120 | else false) | |
121 | 121 | then (atan((y / x)) - 314159) | |
122 | 122 | else if (if ((x == 0)) | |
123 | 123 | then (y > 0) | |
124 | 124 | else false) | |
125 | 125 | then 157080 | |
126 | 126 | else if (if ((x == 0)) | |
127 | 127 | then (0 > y) | |
128 | 128 | else false) | |
129 | 129 | then -157080 | |
130 | 130 | else 0 | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func getShotDistance (v,pitch) = ((((2 * v) * (cos(pitch) * sin(pitch))) / 100000) / 980665) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func distance (lat1,lon1,lat2,lon2) = { | |
137 | 137 | let dLat = (lat1 - lat2) | |
138 | 138 | let dLon = (lon1 - lon2) | |
139 | 139 | let dLatSin = sin((dLat / 2)) | |
140 | 140 | let dLonSin = sin((dLon / 2)) | |
141 | 141 | let hav = ((dLatSin * dLatSin) + (((cos(lat1) * cos(lat2)) / 100000) * ((dLonSin * dLonSin) / 100000))) | |
142 | 142 | let theta = (2 * asin(pow(hav, 5, 5, 1, 5, HALFEVEN))) | |
143 | 143 | ((637100000000 * theta) / 100000) | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func impact (lat,lon,dist,yaw) = { | |
148 | 148 | let th = (dist / 6371000) | |
149 | 149 | let sinLat = sin(lat) | |
150 | 150 | let cosLat = cos(lat) | |
151 | 151 | let sinTh = sin(th) | |
152 | 152 | let cosTh = cos(th) | |
153 | 153 | let newLat = asin((((sinLat * cosTh) / 100000) + (((cosLat * sinTh) * cos(yaw)) / 10000000000))) | |
154 | 154 | let newLon = (lon + (atan2((((sin(yaw) * sinTh) * cosLat) / 100000), (cosTh - ((sinLat * sinLat) / 100000))) * 100)) | |
155 | 155 | [newLat, newLon] | |
156 | 156 | } | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func gotHit (pitch,yaw,force,playerKey,opponentKey) = { | |
160 | 160 | let playerLat = getIntegerValue(this, ("positionLat_" + playerKey)) | |
161 | 161 | let playerLon = getIntegerValue(this, ("positionLon_" + playerKey)) | |
162 | 162 | let opponentLat = getIntegerValue(this, ("positionLat_" + opponentKey)) | |
163 | 163 | let opponentLon = getIntegerValue(this, ("positionLon_" + opponentKey)) | |
164 | 164 | let distanceBetweenPlayers = distance(playerLat, playerLon, opponentLat, opponentLon) | |
165 | 165 | let optimalVelocity = ((distanceBetweenPlayers * 980665) / 100000) | |
166 | 166 | let playerShotReach = getShotDistance(((optimalVelocity * force) / 100000), pitch) | |
167 | 167 | let impactPosition = impact(playerLat, playerLon, playerShotReach, yaw) | |
168 | 168 | let impactDistance = distance(impactPosition[0], impactPosition[1], opponentLat, opponentLon) | |
169 | 169 | impactDistance | |
170 | 170 | } | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | @Callable(i) | |
174 | 174 | func startGame (latitude,longitude) = { | |
175 | 175 | let caller = toString(i.caller) | |
176 | 176 | let coordinates = setCoords(caller, ((latitude * 1745) / 100000), ((longitude * 1745) / 100000)) | |
177 | 177 | let openGame = getString(this, "openGame") | |
178 | 178 | let gameId = getString(this, ("gameId_" + caller)) | |
179 | 179 | if (if ((gameId != "")) | |
180 | 180 | then (gameId != unit) | |
181 | 181 | else false) | |
182 | 182 | then throw("Please finish your current game, before starting another one") | |
183 | 183 | else if (!(isDefined(openGame))) | |
184 | 184 | then WriteSet(DataEntry("openGame", caller) :: coordinates) | |
185 | 185 | else if (if ((openGame == "")) | |
186 | 186 | then true | |
187 | 187 | else (openGame == caller)) | |
188 | 188 | then WriteSet(DataEntry("openGame", caller) :: coordinates) | |
189 | 189 | else WriteSet([DataEntry("openGame", ""), coordinates[0], coordinates[1], setGameData(value(openGame), caller)]) | |
190 | 190 | } | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | ||
194 | 194 | @Callable(i) | |
195 | 195 | func executeShot (pitch,yaw,force) = { | |
196 | 196 | let asset = base58'' | |
197 | 197 | let caller = toString(i.caller) | |
198 | 198 | let opponent = getStringValue(this, ("opponent_" + caller)) | |
199 | 199 | let gameId = getGameId(caller) | |
200 | 200 | if ((getStringValue(this, ("gameTurn_" + gameId)) != caller)) | |
201 | 201 | then throw("please wait for your turn") | |
202 | 202 | else { | |
203 | 203 | let impDist = gotHit(pitch, yaw, force, caller, opponent) | |
204 | 204 | if ((1000 > impDist)) | |
205 | 205 | then ScriptResult(WriteSet([DataEntry(("game_" + gameId), false), DataEntry(("gameWinner_" + gameId), caller)]), TransferSet([ScriptTransfer(i.caller, 2, asset)])) | |
206 | 206 | else WriteSet([DataEntry(("gameTurn_" + gameId), opponent)]) | |
207 | 207 | } | |
208 | 208 | } | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | ||
212 | 212 | @Callable(i) | |
213 | 213 | func faucet () = { | |
214 | 214 | let asset = base58'' | |
215 | 215 | let caller = toString(i.caller) | |
216 | 216 | let balance = assetBalance(i.caller, asset) | |
217 | 217 | if ((100 > balance)) | |
218 | 218 | then TransferSet([ScriptTransfer(i.caller, 100, asset)]) | |
219 | 219 | else TransferSet(nil) | |
220 | 220 | } | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | ||
224 | 224 | @Callable(i) | |
225 | 225 | func changeCoords (latitude,longitude) = { | |
226 | 226 | let caller = toString(i.caller) | |
227 | 227 | let currentLat = getInteger(this, ("positionLat_" + caller)) | |
228 | 228 | if (isDefined(currentLat)) | |
229 | 229 | then { | |
230 | 230 | let coordinates = setCoords(caller, ((latitude * 1745) / 100000), ((longitude * 1745) / 100000)) | |
231 | 231 | WriteSet(coordinates) | |
232 | 232 | } | |
233 | 233 | else WriteSet(nil) | |
234 | 234 | } | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | ||
238 | 238 | @Callable(i) | |
239 | 239 | func testMathFunctions () = { | |
240 | 240 | let sinN180 = sin(-314159) | |
241 | 241 | let sinN90 = sin(-157080) | |
242 | 242 | let sinN45 = sin(-78540) | |
243 | 243 | let sin0 = sin(0) | |
244 | 244 | let sin45 = sin(78540) | |
245 | 245 | let sin90 = sin(157080) | |
246 | 246 | let sin180 = sin(314159) | |
247 | 247 | let sin270 = sin(471239) | |
248 | 248 | let cosN180 = cos(-314159) | |
249 | 249 | let cosN90 = cos(-157080) | |
250 | 250 | let cosN45 = cos(-78540) | |
251 | 251 | let cos0 = cos(0) | |
252 | 252 | let cos45 = cos(78540) | |
253 | 253 | let cos90 = cos(157080) | |
254 | 254 | let cos180 = cos(314159) | |
255 | 255 | let cos270 = cos(471239) | |
256 | 256 | let asinN1 = asin(-100000) | |
257 | 257 | let asinN5 = asin(-50000) | |
258 | 258 | let asin0 = asin(0) | |
259 | 259 | let asin5 = asin(50000) | |
260 | 260 | let asin1 = asin(100000) | |
261 | 261 | let atanN10 = atan(-1000000) | |
262 | 262 | let atanN5 = atan(-500000) | |
263 | 263 | let atan0 = atan(0) | |
264 | - | WriteSet([DataEntry("SinN180", sinN180), DataEntry("SinN90", sinN90), DataEntry("SinN45", sinN45), DataEntry("Sin0", sin0), DataEntry("Sin45", sin45), DataEntry("Sin90", sin90), DataEntry("Sin180", sin180), DataEntry("Sin270", sin270), DataEntry("CosN180", cosN180), DataEntry("CosN90", cosN90), DataEntry("CosN45", cosN45), DataEntry("Cos0", cos0), DataEntry("Cos45", cos45), DataEntry("Cos90", cos90), DataEntry("Cos180", cos180), DataEntry("Cos270", cos270), DataEntry("AsinN1", asinN1), DataEntry("AsinN5", asinN5), DataEntry("Asin0", asin0), DataEntry("Asin1", asin1), DataEntry("Asin5", asin5), DataEntry("AtanN10", atanN10), DataEntry("AtanN5", atanN5), DataEntry("Atan0", atan0)]) | |
264 | + | let atan5 = atan(500000) | |
265 | + | let atan10 = atan(1000000) | |
266 | + | WriteSet([DataEntry("SinN180", sinN180), DataEntry("SinN90", sinN90), DataEntry("SinN45", sinN45), DataEntry("Sin0", sin0), DataEntry("Sin45", sin45), DataEntry("Sin90", sin90), DataEntry("Sin180", sin180), DataEntry("Sin270", sin270), DataEntry("CosN180", cosN180), DataEntry("CosN90", cosN90), DataEntry("CosN45", cosN45), DataEntry("Cos0", cos0), DataEntry("Cos45", cos45), DataEntry("Cos90", cos90), DataEntry("Cos180", cos180), DataEntry("Cos270", cos270), DataEntry("AsinN1", asinN1), DataEntry("AsinN5", asinN5), DataEntry("Asin0", asin0), DataEntry("Asin1", asin1), DataEntry("Asin5", asin5), DataEntry("AtanN10", atanN10), DataEntry("AtanN5", atanN5), DataEntry("Atan0", atan0), DataEntry("Atan5", atan5), DataEntry("Atan10", atan10)]) | |
265 | 267 | } | |
266 | 268 | ||
267 | 269 |
github/deemru/w8io/026f985 42.06 ms ◑