tx · EjWyTuQ1c4zPNjgSUa8dvAkRMQBCGkeUderSJDZQqniP 3NCFV4YSBFCEBXDYHwCuh6X5SqMeQXFgEaf: -0.01500000 Waves 2021.06.03 13:46 [1554265] smart account 3NCFV4YSBFCEBXDYHwCuh6X5SqMeQXFgEaf > SELF 0.00000000 Waves
{ "type": 13, "id": "EjWyTuQ1c4zPNjgSUa8dvAkRMQBCGkeUderSJDZQqniP", "fee": 1500000, "feeAssetId": null, "timestamp": 1622728031259, "version": 2, "chainId": 84, "sender": "3NCFV4YSBFCEBXDYHwCuh6X5SqMeQXFgEaf", "senderPublicKey": "6zkdpCUGZybpbh7mrJvMphWq6fUvbGoyxafdsQjtwsWA", "proofs": [ "4U1BDpk6LNuekvBF51W7jgxBMZ8w4YQynYi8HW18xNWEhg11vrFdmzmDdtq4GVokME8FE3KSwen2pjsmo3SGPWVa" ], "script": "base64:AAIEAAAAAAAAAB4IAhIAEgASABIDCgEIEgMKAQgSBAoCCAESBAoCCAEAAABJAAAAABNnYW1lTWFzdGVyUHVibGljS2V5AQAAACCLHi1hJl8BxDXwXKLtpRVjbFBsmFHgcP8XgvTnW2biYwAAAAAKZGljZU51bWJlcgkABEwAAAACAAAAAAAAAAACCQAETAAAAAIAAAAAAAAAAAMJAARMAAAAAgAAAAAAAAAABAkABEwAAAACAAAAAAAAAAAFCQAETAAAAAIAAAAAAAAAAAYJAARMAAAAAgAAAAAAAAAABwkABEwAAAACAAAAAAAAAAAICQAETAAAAAIAAAAAAAAAAAkJAARMAAAAAgAAAAAAAAAACgkABEwAAAACAAAAAAAAAAALCQAETAAAAAIAAAAAAAAAAAwFAAAAA25pbAAAAAAJZ2FtZVRva2VuAQAAACCvQNOoGbkt3wVk9kpr+yD9dOUY7LBdGNCbLK5MVkSodQAAAAAJUlNBUFVCTElDCQACWwAAAAECAAABj2Jhc2U2NDpNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQWpudDJQZE4xUGR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0BQAAAApyYW5kb21IYXNoBQAAAAxHQU1FRklOSVNIRUQJAQAAABtzdG9yZUdhbWVQcm9ncmVzc1BvaW50U3RhdGUAAAAHCQEAAAAZZ2FtZUN1cnJlbnRQb2ludERpY2VMYWJlbAAAAAEFAAAACmdhbWVOdW1iZXIFAAAACmdhbWVOdW1iZXIFAAAABm51bWJlcgUAAAASbmV3Um9sbENvdW50TnVtYmVyBQAAAA1jdXJyZW50SGVpZ2h0BQAAAApyYW5kb21IYXNoBQAAAA5HQU1FSU5QUk9HUkVTUwkAAAIAAAABAgAAABlObyBkaWNlcyBoYXZlIGJlZW4gdGhyb3duCQAAAgAAAAECAAAAGUxhc3QgYmxvY2sgZG9lc24ndCBleGlzdC4JAAACAAAAAQIAAAARU0hBIGRvZXNuJ3QgZXhpc3QJAAACAAAAAQIAAAA3VGhyb3cgZGljZSBub3QgYWxsb3cgc3RpbGwgd2FpdGluZyBmb3IgYmxvY2sgdG8gcHJvY2VzcwkAAAIAAAABAgAAAClHYW1lIGRvZXMgbm90IGV4aXN0IG9yIGhhcyBhbHJlYWR5IGVuZGVkLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleangzFs=", "height": 1554265, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3xyfGpiECe248rgrw1jv4cPiFii3BgCvLjVfUDdJHtTt Next: F2kS4LccRVAChi2rK44KWyBkn5tK6ML2TWm8Xej7yimR Diff:
Old | New | Differences | |
---|---|---|---|
190 | 190 | func getWinningAmountForOdds (amount,odd,resultOfRound) = if (if ((odd == 4)) | |
191 | 191 | then true | |
192 | 192 | else (odd == 10)) | |
193 | - | then { | |
194 | - | let winningAmount = (amount * 7) | |
195 | - | winningAmount | |
196 | - | } | |
193 | + | then (amount * 7) | |
197 | 194 | else if (if ((odd == 5)) | |
198 | 195 | then true | |
199 | 196 | else (odd == 8)) | |
200 | - | then { | |
201 | - | let winningAmount = (amount * 9) | |
202 | - | winningAmount | |
203 | - | } | |
197 | + | then (amount * 9) | |
204 | 198 | else if (if ((odd == 3)) | |
205 | 199 | then true | |
206 | 200 | else (odd == 11)) | |
207 | - | then { | |
208 | - | let winningAmount = (amount * 15) | |
209 | - | winningAmount | |
210 | - | } | |
201 | + | then (amount * 15) | |
211 | 202 | else if (if ((odd == 2)) | |
212 | 203 | then true | |
213 | 204 | else (odd == 12)) | |
214 | - | then { | |
215 | - | let winningAmount = (amount * 30) | |
216 | - | winningAmount | |
217 | - | } | |
205 | + | then (amount * 30) | |
218 | 206 | else if (if ((odd == 10)) | |
219 | 207 | then true | |
220 | 208 | else (odd == 4)) | |
221 | - | then { | |
222 | - | let winningAmount = (amount * 30) | |
223 | - | winningAmount | |
224 | - | } | |
209 | + | then (amount * 30) | |
225 | 210 | else if ((odd == 7)) | |
226 | - | then { | |
227 | - | let winningAmount = (amount * 4) | |
228 | - | winningAmount | |
229 | - | } | |
211 | + | then (amount * 4) | |
230 | 212 | else if (if ((odd == 100)) | |
231 | 213 | then if (if ((resultOfRound == 3)) | |
232 | 214 | then true | |
234 | 216 | then true | |
235 | 217 | else (resultOfRound == 2) | |
236 | 218 | else false) | |
237 | - | then { | |
238 | - | let winningAmount = (amount * 7) | |
239 | - | winningAmount | |
240 | - | } | |
219 | + | then (amount * 7) | |
241 | 220 | else 0 | |
242 | 221 | ||
243 | 222 | ||
244 | 223 | func getWinningAmountForField (amount,resultOfRound) = if ((resultOfRound == 12)) | |
245 | - | then { | |
246 | - | let winningAmount = (amount * 4) | |
247 | - | winningAmount | |
248 | - | } | |
224 | + | then (amount * 4) | |
249 | 225 | else if ((resultOfRound == 2)) | |
250 | - | then { | |
251 | - | let winningAmount = (amount * 3) | |
252 | - | winningAmount | |
253 | - | } | |
226 | + | then (amount * 3) | |
254 | 227 | else if (if (if (if ((resultOfRound == 5)) | |
255 | 228 | then true | |
256 | 229 | else (resultOfRound == 6)) | |
259 | 232 | then true | |
260 | 233 | else (resultOfRound == 8)) | |
261 | 234 | then 0 | |
262 | - | else { | |
263 | - | let winningAmount = (amount * 2) | |
264 | - | winningAmount | |
265 | - | } | |
235 | + | else (amount * 2) | |
266 | 236 | ||
267 | 237 | ||
268 | 238 | func storeOneRoundBetTypes (gameCounter,amount,typeBet,caller,odd) = match getGameTotalFieldOrOddsBets() { | |
292 | 262 | else rollPlaceBetIntoAnotherRoundBet((totalFieldBets + 1), (lastFieldProcessBet + 1), (betOnRoll + 1), gameNumber, toString(amount), betType, betPlacer, odd) | |
293 | 263 | ||
294 | 264 | ||
295 | - | func storeComeDontComeBet (gameState,betDetails,resultOfRound,amount,totalFieldBets,lastFieldProcessBet,betOnRoll,gameNumber,betType,betPlacer,odd) = { | |
296 | - | let comeBetGameNumber = value(parseInt(split(betDetails, "_")[5])) | |
297 | - | let comeBetRollNumber = value(parseInt(split(betDetails, "_")[6])) | |
298 | - | let resultOfGame = value(getGameRollDiceWithGameNumber(comeBetGameNumber, comeBetRollNumber)) | |
299 | - | if ((resultOfRound == 7)) | |
300 | - | then if ((betDetails == COMEBET)) | |
301 | - | then throw("Only Field Type of Bet can be proceed") | |
302 | - | else throw("Only Field Type of Bet can be proceed") | |
303 | - | else if ((resultOfRound == resultOfGame)) | |
304 | - | then throw("Only Field Type of Bet can be proceed") | |
305 | - | else if ((gameState == GAMEFINISHED)) | |
306 | - | then storeNextRoll(gameState, amount, (totalFieldBets + 1), (lastFieldProcessBet + 1), 1, (gameNumber + 1), betType, betPlacer, odd) | |
307 | - | else storeNextRoll(gameState, amount, (totalFieldBets + 1), (lastFieldProcessBet + 1), (betOnRoll + 1), gameNumber, betType, betPlacer, odd) | |
308 | - | } | |
309 | - | ||
310 | - | ||
311 | - | func storePassOrComeBet (gameCounter,amount,typeBet,caller) = match getGameTotalBets() { | |
265 | + | func storePassBet (gameCounter,amount,typeBet,caller) = match getGameTotalBets() { | |
312 | 266 | case number: Int => | |
313 | 267 | let newTotalBets = (number + 1) | |
314 | 268 | [IntegerEntry(gameBetCounterLabel(newTotalBets), gameCounter), StringEntry(gameBetLineLabel(newTotalBets), (((((caller + "_") + amount) + "_") + typeBet) + "_active_pending")), IntegerEntry(gameTotalBetsLabel, newTotalBets)] | |
338 | 292 | func storeGameProgressPointState (storeIndex,gameNumber,number,rollCount,currentHeight,randomHash,state) = [IntegerEntry(gameStateLabel(gameNumber), state), IntegerEntry(storeIndex, number), IntegerEntry(gameRollsCountBetLabel(gameNumber), rollCount), IntegerEntry(gameEndHeightLabel(gameNumber), (currentHeight + BLOCKTOPROCESSFORTHROW)), StringEntry(gameRandomHashLabel(gameNumber), toBase64String(randomHash)), IntegerEntry(gameRollDiceWithGameNumberLabel(gameNumber, rollCount), number)] | |
339 | 293 | ||
340 | 294 | ||
295 | + | func getWinningAmountPassLineBets (firstPoint,lastPoint,betDetails) = { | |
296 | + | let betType = split(betDetails, "_")[2] | |
297 | + | let betPlacer = split(betDetails, "_")[0] | |
298 | + | let amount = value(parseInt(split(betDetails, "_")[1])) | |
299 | + | if ((betType == PASSLINEBET)) | |
300 | + | then if ((lastPoint == 0)) | |
301 | + | then if (if ((firstPoint == 7)) | |
302 | + | then true | |
303 | + | else (firstPoint == 11)) | |
304 | + | then (amount * 2) | |
305 | + | else 0 | |
306 | + | else if ((firstPoint == lastPoint)) | |
307 | + | then (amount * 2) | |
308 | + | else if ((lastPoint == 7)) | |
309 | + | then 0 | |
310 | + | else 0 | |
311 | + | else if ((betType == DONTPASSLINEBET)) | |
312 | + | then if ((lastPoint == 0)) | |
313 | + | then if (if ((firstPoint == 2)) | |
314 | + | then true | |
315 | + | else (firstPoint == 3)) | |
316 | + | then (amount * 2) | |
317 | + | else if (if ((lastPoint == 7)) | |
318 | + | then true | |
319 | + | else (lastPoint == 11)) | |
320 | + | then 0 | |
321 | + | else 0 | |
322 | + | else if (if ((lastPoint == 2)) | |
323 | + | then true | |
324 | + | else (lastPoint == 3)) | |
325 | + | then (amount * 2) | |
326 | + | else if ((lastPoint == 7)) | |
327 | + | then 0 | |
328 | + | else 0 | |
329 | + | else 0 | |
330 | + | } | |
331 | + | ||
332 | + | ||
333 | + | func getWinningAmountOneRoundBets (betDetails,resultOfRound,round) = { | |
334 | + | let betType = split(betDetails, "_")[2] | |
335 | + | let odd = value(parseInt(split(betDetails, "_")[5])) | |
336 | + | let amount = value(parseInt(split(betDetails, "_")[1])) | |
337 | + | if ((betType == FIELDBET)) | |
338 | + | then if ((resultOfRound == 12)) | |
339 | + | then (amount * 4) | |
340 | + | else if ((resultOfRound == 2)) | |
341 | + | then (amount * 3) | |
342 | + | else if (if (if (if ((resultOfRound == 5)) | |
343 | + | then true | |
344 | + | else (resultOfRound == 6)) | |
345 | + | then true | |
346 | + | else (resultOfRound == 7)) | |
347 | + | then true | |
348 | + | else (resultOfRound == 8)) | |
349 | + | then 0 | |
350 | + | else (amount * 2) | |
351 | + | else if ((betType == ODDSBET)) | |
352 | + | then if (if ((odd == 4)) | |
353 | + | then true | |
354 | + | else (odd == 10)) | |
355 | + | then (amount * 7) | |
356 | + | else if (if ((odd == 5)) | |
357 | + | then true | |
358 | + | else (odd == 8)) | |
359 | + | then (amount * 9) | |
360 | + | else if (if ((odd == 3)) | |
361 | + | then true | |
362 | + | else (odd == 11)) | |
363 | + | then (amount * 15) | |
364 | + | else if (if ((odd == 2)) | |
365 | + | then true | |
366 | + | else (odd == 12)) | |
367 | + | then (amount * 30) | |
368 | + | else if (if ((odd == 10)) | |
369 | + | then true | |
370 | + | else (odd == 4)) | |
371 | + | then (amount * 30) | |
372 | + | else if ((odd == 7)) | |
373 | + | then (amount * 4) | |
374 | + | else if (if ((odd == 100)) | |
375 | + | then if (if ((resultOfRound == 3)) | |
376 | + | then true | |
377 | + | else (resultOfRound == 12)) | |
378 | + | then true | |
379 | + | else (resultOfRound == 2) | |
380 | + | else false) | |
381 | + | then (amount * 7) | |
382 | + | else 0 | |
383 | + | else if ((betType == BIG6OR8BET)) | |
384 | + | then if (if ((resultOfRound == 6)) | |
385 | + | then true | |
386 | + | else (resultOfRound == 8)) | |
387 | + | then (2 * amount) | |
388 | + | else 0 | |
389 | + | else if (if ((betType == PLACEBETLAY)) | |
390 | + | then true | |
391 | + | else (betType == PLACEBETLOSE)) | |
392 | + | then if ((resultOfRound == 7)) | |
393 | + | then (amount * 2) | |
394 | + | else if ((resultOfRound == odd)) | |
395 | + | then 0 | |
396 | + | else -1 | |
397 | + | else if (if ((betType == PLACEBETBUY)) | |
398 | + | then true | |
399 | + | else (betType == PLACEBETWIN)) | |
400 | + | then if ((resultOfRound == 7)) | |
401 | + | then 0 | |
402 | + | else if ((resultOfRound == odd)) | |
403 | + | then (amount * 2) | |
404 | + | else -1 | |
405 | + | else if ((betType == COMEBET)) | |
406 | + | then { | |
407 | + | let playerPoint = value(parseInt(split(betDetails, "_")[6])) | |
408 | + | if ((round == 2)) | |
409 | + | then if (if ((resultOfRound == 7)) | |
410 | + | then true | |
411 | + | else (resultOfRound == 11)) | |
412 | + | then (amount * 2) | |
413 | + | else if (if (if ((resultOfRound == 2)) | |
414 | + | then true | |
415 | + | else (resultOfRound == 12)) | |
416 | + | then true | |
417 | + | else (resultOfRound == 3)) | |
418 | + | then 0 | |
419 | + | else if ((resultOfRound == playerPoint)) | |
420 | + | then (amount * 2) | |
421 | + | else -1 | |
422 | + | else if ((round > 2)) | |
423 | + | then if ((resultOfRound == 7)) | |
424 | + | then 0 | |
425 | + | else if ((resultOfRound == playerPoint)) | |
426 | + | then (amount * 2) | |
427 | + | else -1 | |
428 | + | else throw("Not Allow in The Beginning") | |
429 | + | } | |
430 | + | else if ((betType == DONTCOMEBET)) | |
431 | + | then { | |
432 | + | let playerPoint = value(parseInt(split(betDetails, "_")[6])) | |
433 | + | if ((round == 2)) | |
434 | + | then if (if ((resultOfRound == 7)) | |
435 | + | then true | |
436 | + | else (resultOfRound == 11)) | |
437 | + | then 0 | |
438 | + | else if (if (if ((resultOfRound == 2)) | |
439 | + | then true | |
440 | + | else (resultOfRound == 12)) | |
441 | + | then true | |
442 | + | else (resultOfRound == 3)) | |
443 | + | then (amount * 2) | |
444 | + | else if ((resultOfRound == playerPoint)) | |
445 | + | then (amount * 2) | |
446 | + | else -1 | |
447 | + | else if ((round > 1)) | |
448 | + | then if ((resultOfRound == 7)) | |
449 | + | then (amount * 2) | |
450 | + | else if ((resultOfRound == playerPoint)) | |
451 | + | then 0 | |
452 | + | else -1 | |
453 | + | else throw("Not Allow in The Beginning") | |
454 | + | } | |
455 | + | else 0 | |
456 | + | } | |
457 | + | ||
458 | + | ||
341 | 459 | @Callable(i) | |
342 | 460 | func processNextBet () = if (authorizePermission(i.callerPublicKey)) | |
343 | 461 | then throw("processFieldBet_FORBIDDEN") | |
358 | 476 | then throw("Game has to finished in order to process NON-FIELD bets") | |
359 | 477 | else { | |
360 | 478 | let betDetails = value(getBetDetailsResult(nextBet)) | |
361 | - | let betType = split(betDetails, "_")[2] | |
362 | - | let betPlacer = split(betDetails, "_")[0] | |
363 | - | let amount = value(parseInt(split(betDetails, "_")[1])) | |
364 | - | let address = value(addressFromString(betPlacer)) | |
479 | + | let address = value(addressFromString(split(betDetails, "_")[0])) | |
365 | 480 | let currentPoint = getCurrentPointDice(nextBet) | |
366 | - | let firstPoint = getFirstPointDice(nextBet) | |
367 | - | let updateBetDetials = (((((betPlacer + "_") + split(betDetails, "_")[1]) + "_") + split(betDetails, "_")[2]) + "_inactive_") | |
368 | - | if ((betType == PASSLINEBET)) | |
369 | - | then if ((currentPoint == 0)) | |
370 | - | then if (if ((firstPoint == 7)) | |
371 | - | then true | |
372 | - | else (firstPoint == 11)) | |
373 | - | then { | |
374 | - | let winningAmount = (amount * 2) | |
375 | - | updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, betPlacer, winningAmount, betType, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
376 | - | } | |
377 | - | else udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
378 | - | else if ((firstPoint == currentPoint)) | |
379 | - | then { | |
380 | - | let winningAmount = (amount * 2) | |
381 | - | updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, betPlacer, winningAmount, betType, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
382 | - | } | |
383 | - | else if ((currentPoint == 7)) | |
384 | - | then udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
385 | - | else udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
386 | - | else if ((betType == DONTPASSLINEBET)) | |
387 | - | then if ((currentPoint == 0)) | |
388 | - | then if (if ((firstPoint == 2)) | |
389 | - | then true | |
390 | - | else (firstPoint == 3)) | |
391 | - | then { | |
392 | - | let winningAmount = (amount * 2) | |
393 | - | updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, betPlacer, winningAmount, betType, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
394 | - | } | |
395 | - | else if (if ((currentPoint == 7)) | |
396 | - | then true | |
397 | - | else (currentPoint == 11)) | |
398 | - | then udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
399 | - | else udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
400 | - | else if (if ((currentPoint == 2)) | |
401 | - | then true | |
402 | - | else (currentPoint == 3)) | |
403 | - | then { | |
404 | - | let winningAmount = (amount * 2) | |
405 | - | updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, betPlacer, winningAmount, betType, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
406 | - | } | |
407 | - | else if ((currentPoint == 7)) | |
408 | - | then udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
409 | - | else udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
410 | - | else throw((((((("Only " + PASSLINEBET) + ", ") + DONTPASSLINEBET) + " allowed in processNextBet()") + " currentBetType ") + betType)) | |
481 | + | let firstPoint = value(getFirstPointDice(nextBet)) | |
482 | + | let updateBetDetials = (((((split(betDetails, "_")[0] + "_") + split(betDetails, "_")[1]) + "_") + split(betDetails, "_")[2]) + "_inactive_") | |
483 | + | let winningAmountResult = getWinningAmountPassLineBets(firstPoint, currentPoint, betDetails) | |
484 | + | if ((winningAmountResult == 0)) | |
485 | + | then udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
486 | + | else if ((winningAmountResult > 0)) | |
487 | + | then updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, split(betDetails, "_")[0], winningAmountResult, split(betDetails, "_")[2], gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
488 | + | else throw((((((("Only " + PASSLINEBET) + ", ") + DONTPASSLINEBET) + " allowed in processNextBet()") + " currentBetType ") + split(betDetails, "_")[2])) | |
411 | 489 | } | |
412 | 490 | case _ => | |
413 | 491 | throw("Game does not exist or has already ended.") | |
448 | 526 | let odd = value(parseInt(split(betDetails, "_")[5])) | |
449 | 527 | let address = value(addressFromString(betPlacer)) | |
450 | 528 | let betOnRoll = value(getFieldOddsBetForNextDice(nextBet)) | |
529 | + | let updateBetDetials = (((((betPlacer + "_") + split(betDetails, "_")[1]) + "_") + split(betDetails, "_")[2]) + "_inactive_") | |
451 | 530 | match getGameRollDiceWithGameNumber(gameNumber, betOnRoll) { | |
452 | 531 | case resultOfRound: Int => | |
453 | - | let updateBetDetials = (((((betPlacer + "_") + split(betDetails, "_")[1]) + "_") + split(betDetails, "_")[2]) + "_inactive_") | |
454 | - | if ((betType == FIELDBET)) | |
455 | - | then { | |
456 | - | let winningAmount = getWinningAmountForField(amount, resultOfRound) | |
457 | - | if ((winningAmount == 0)) | |
458 | - | then udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameFieldOrOddsBetLineLabel(gameNumber), gameTotalProccedFieldOrOddsBetsLabel) | |
459 | - | else updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, betPlacer, winningAmount, betType, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel) | |
460 | - | } | |
461 | - | else if ((betType == ODDSBET)) | |
462 | - | then { | |
463 | - | let winningAmount = getWinningAmountForOdds(amount, odd, resultOfRound) | |
464 | - | if ((winningAmount == 0)) | |
465 | - | then updateBetDetailsWithWinning((updateBetDetials + "_won_"), gameNumber, nextBet, betPlacer, winningAmount, betType, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel) | |
466 | - | else udpateBetDetailsWithLostWithOdd(updateBetDetials, gameNumber, nextBet, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel, odd) | |
467 | - | } | |
468 | - | else if ((betType == BIG6OR8BET)) | |
469 | - | then if (if ((resultOfRound == 6)) | |
470 | - | then true | |
471 | - | else (resultOfRound == 8)) | |
472 | - | then { | |
473 | - | let winningAmount = (2 * amount) | |
474 | - | updateBetDetailsWithWinning((updateBetDetials + "_won_"), gameNumber, nextBet, betPlacer, winningAmount, betType, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel) | |
475 | - | } | |
476 | - | else udpateBetDetailsWithLostWithOdd(updateBetDetials, gameNumber, nextBet, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel, odd) | |
477 | - | else if (if ((betType == PLACEBETBUY)) | |
478 | - | then true | |
479 | - | else (betType == PLACEBETWIN)) | |
480 | - | then if ((resultOfRound == 7)) | |
481 | - | then udpateBetDetailsWithLostWithOdd(updateBetDetials, gameNumber, nextBet, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel, odd) | |
482 | - | else if ((resultOfRound == odd)) | |
483 | - | then { | |
484 | - | let winningAmount = (amount * 2) | |
485 | - | updateBetDetailsWithWinning((updateBetDetials + "_won_"), gameNumber, nextBet, betPlacer, winningAmount, betType, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel) | |
486 | - | } | |
487 | - | else storeNextRoll(gameState, amount, (totalFieldBets + 1), (lastFieldProcessBet + 1), 1, (gameNumber + 1), betType, betPlacer, odd) | |
488 | - | else if (if ((betType == PLACEBETLAY)) | |
489 | - | then true | |
490 | - | else (betType == PLACEBETLOSE)) | |
491 | - | then if ((resultOfRound == 7)) | |
492 | - | then { | |
493 | - | let winningAmount = (amount * 2) | |
494 | - | updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, betPlacer, winningAmount, betType, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel) | |
495 | - | } | |
496 | - | else if ((resultOfRound == odd)) | |
497 | - | then udpateBetDetailsWithLostWithOdd(updateBetDetials, gameNumber, nextBet, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel, odd) | |
498 | - | else storeNextRoll(gameState, amount, (totalFieldBets + 1), (lastFieldProcessBet + 1), 1, (gameNumber + 1), betType, betPlacer, odd) | |
499 | - | else if (if ((betType == COMEBET)) | |
500 | - | then true | |
501 | - | else (betType == DONTCOMEBET)) | |
502 | - | then storeComeDontComeBet(gameState, betDetails, resultOfRound, amount, totalFieldBets, lastFieldProcessBet, betOnRoll, gameNumber, betType, betPlacer, odd) | |
503 | - | else throw("Only Field Type of Bet can be proceed") | |
532 | + | let roundRole = value(parseInt(gameRollsCountBetLabel(gameNumber))) | |
533 | + | let winningAmountOneRoundBet = getWinningAmountOneRoundBets(betDetails, resultOfRound, roundRole) | |
534 | + | if ((winningAmountOneRoundBet == -1)) | |
535 | + | then storeNextRoll(gameState, amount, totalFieldBets, lastFieldProcessBet, betOnRoll, gameNumber, betType, betPlacer, odd) | |
536 | + | else if ((winningAmountOneRoundBet == 0)) | |
537 | + | then udpateBetDetailsWithLostWithOdd(updateBetDetials, gameNumber, nextBet, gameFieldOrOddsBetLineLabel(gameNumber), gameTotalProccedFieldOrOddsBetsLabel, odd) | |
538 | + | else updateBetDetailsWithWinning((updateBetDetials + "_won_"), gameNumber, nextBet, betPlacer, winningAmountOneRoundBet, betType, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel) | |
504 | 539 | case _ => | |
505 | 540 | throw("There is no result for this round yet") | |
506 | 541 | } | |
574 | 609 | then if (if ((typeBet == PASSLINEBET)) | |
575 | 610 | then true | |
576 | 611 | else (typeBet == DONTPASSLINEBET)) | |
577 | - | then | |
612 | + | then storePassBet(GAMENUMBER, toString(p.amount), typeBet, toBase58String(i.caller.bytes)) | |
578 | 613 | else throw((((((("Only " + PASSLINEBET) + ", ") + DONTPASSLINEBET) + " and ") + FIELDBET) + " are allowed in the Beginning of Game")) | |
579 | 614 | else if ((state == GAMEINPROGRESS)) | |
580 | 615 | then throw((((((("Only " + COMEBET) + ", ") + DONTCOMEBET) + " and ") + FIELDBET) + " ARE ALLOWED at Start.")) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let gameMasterPublicKey = base58'AN4MpPP69eUoXBNDezAU1WiBE9X2oVfoN8T7XeyRxiKt' | |
5 | 5 | ||
6 | 6 | let diceNumber = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] | |
7 | 7 | ||
8 | 8 | let gameToken = base58'Co7gTLr7ZJvVKwToLpuZJqmkVecy5uwupYH6qCkKuhc8' | |
9 | 9 | ||
10 | 10 | let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjnt2PdN1Pdj7rsXzbapgucn9e1XffUx1o7grAlw8C6NFuv1PPj7KnQ6RtN9xhniLF4xKlc7//TYXd1uHWmx9vu9hjciYX9UMRJnhlZO2q34mxPdcgLDKhJHDN726KI0wHpFQ5dHMyzoMLdWsahFc1Wx/XxroK2Kc1y2JBWN2akRlkxSDcluqbbUcWMyrwG6iWuVlhej5xfcuerg/psK35WGn7SLF29tWuR2x+24nM+BJUsuRG7yBZUhGrYzJk2gvpucRLea6AFRvow7RdyMYAwKFrr6mgQ0VcUw2T750e1oGanY0UdU3NPsKIgvU4Ft4uibMlMMBJvcrsEbDQHfDlwIDAQAB") | |
11 | 11 | ||
12 | 12 | let GAMESTART = 0 | |
13 | 13 | ||
14 | 14 | let GAMEINPROGRESS = 1 | |
15 | 15 | ||
16 | 16 | let GAMEFINISHED = 2 | |
17 | 17 | ||
18 | 18 | let BLOCKTOPROCESSFORTHROW = 1 | |
19 | 19 | ||
20 | 20 | let PASSLINEBET = "PASSLINEBET" | |
21 | 21 | ||
22 | 22 | let DONTPASSLINEBET = "DONTPASSLINEBET" | |
23 | 23 | ||
24 | 24 | let COMEBET = "COMEBET" | |
25 | 25 | ||
26 | 26 | let DONTCOMEBET = "DONTCOMEBET" | |
27 | 27 | ||
28 | 28 | let FIELDBET = "FIELDBET" | |
29 | 29 | ||
30 | 30 | let ODDSBET = "ODDSBET" | |
31 | 31 | ||
32 | 32 | let BIG6OR8BET = "BIG6OR8BET" | |
33 | 33 | ||
34 | 34 | let PLACEBETBUY = "PLACEBETBUY" | |
35 | 35 | ||
36 | 36 | let PLACEBETLOSE = "PLACEBETLOSE" | |
37 | 37 | ||
38 | 38 | let PLACEBETLAY = "PLACEBETLAY" | |
39 | 39 | ||
40 | 40 | let PLACEBETWIN = "PLACEBETWIN" | |
41 | 41 | ||
42 | 42 | let gameCounterLabel = "G_GAMECOUNTER" | |
43 | 43 | ||
44 | 44 | let gameTotalBetsLabel = "G_TOTALBETS" | |
45 | 45 | ||
46 | 46 | let gameTotalProccedBetsLabel = "G_PROCESSEDBETS" | |
47 | 47 | ||
48 | 48 | let gameTotalFieldBetsLabel = "G_TOTALFIELD_ODDS_BETS" | |
49 | 49 | ||
50 | 50 | let gameTotalProccedFieldOrOddsBetsLabel = "G_PROCESSEDFIEL_ODDS_BETS" | |
51 | 51 | ||
52 | 52 | func gameStartHeightLabel (gameCounter) = (("G_" + toString(gameCounter)) + "_STARTHEIGHT") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func gameEndHeightLabel (gameCounter) = (("G_" + toString(gameCounter)) + "_ENDHEIGHT") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getStartHeight (gameCounter) = getInteger(this, gameStartHeightLabel(gameCounter)) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getEndHeight (gameCounter) = getInteger(this, gameEndHeightLabel(gameCounter)) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func gameBetLineLabel (betNumber) = (("B_" + toString(betNumber)) + "_BETDETAILS") | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func gameFieldOrOddsBetLineLabel (betNumber) = (("B_" + toString(betNumber)) + "_BETFIELODDSDDETAILS") | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getBetDetailsResult (betNumber) = getString(this, gameBetLineLabel(betNumber)) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func getFieldBetDetailsResult (betNumber) = getString(this, gameFieldOrOddsBetLineLabel(betNumber)) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func authorizePermission (callerPublicKey) = (callerPublicKey != gameMasterPublicKey) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func gameCurrentPointDiceLabel (gameCounter) = (("G_" + toString(gameCounter)) + "_LASTPOINT") | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func gameFirstPointDiceLabel (gameCounter) = (("G_" + toString(gameCounter)) + "_FIRSTPOINT") | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func gameWinningNumberBetLabel (gameCounter,betNumber,betType) = ((((((("W_" + "BET_TYPE_") + betType) + "_") + toString(betNumber)) + "_WINNING_BET_") + toString(gameCounter)) + "_GAME_NUMBER") | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func gameStateLabel (gameCounter) = (("G_" + toString(gameCounter)) + "_STATE") | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func gameSumShaLabel (gameCounter) = (("G_" + toString(gameCounter)) + "_SUMSHA") | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func gameRandomHashLabel (gameCounter) = (("G_" + toString(gameCounter)) + "_RANDOMHASH") | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func getGameTotalBets () = getInteger(this, gameTotalBetsLabel) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func getGameProcessedBets () = getInteger(this, gameTotalProccedBetsLabel) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func getGameTotalFieldOrOddsBets () = getInteger(this, gameTotalFieldBetsLabel) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func getGameProcessedFieldOrOddsBets () = getInteger(this, gameTotalProccedFieldOrOddsBetsLabel) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func getGameState (gameCounter) = getInteger(this, gameStateLabel(gameCounter)) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func getGameSumSha (gameCounter) = getString(this, gameSumShaLabel(gameCounter)) | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func getRandomHash (gameCounter) = getString(this, gameRandomHashLabel(gameCounter)) | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func gameRollsCountBetLabel (gameCounter) = (("G_" + toString(gameCounter)) + "_ROLLSCOUNT") | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func gameRollDiceWithGameNumberLabel (gameCounter,rollDice) = (((("G_" + toString(gameCounter)) + "_") + toString(rollDice)) + "_GAMENUMBER_ROLLDICE") | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func gameFieldOrOddsBetForNextThrowLabel (betNumber) = (("B_" + toString(betNumber)) + "_FIELD_ODDS_BET_ROLLDICE") | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func getGameRollsCount (gameCounter) = getInteger(this, gameRollsCountBetLabel(gameCounter)) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func getGameRollDiceWithGameNumber (gameCounter,rollDice) = getInteger(this, gameRollDiceWithGameNumberLabel(gameCounter, rollDice)) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func getFieldOddsBetForNextDice (betNumber) = getInteger(this, gameFieldOrOddsBetForNextThrowLabel(betNumber)) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func gameBetCounterLabel (gameNumber) = (("B_" + toString(gameNumber)) + "_BET_GAMENUMBER") | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func gameFieldOrOddsBetGameCounterLabel (gameNumber) = (("B_" + toString(gameNumber)) + "_FIELD_ODDS_BET_GAMENUMBER") | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func getGameBetCounter (gameNumber) = getInteger(this, gameBetCounterLabel(gameNumber)) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func getGameFieldOrOddsBetCounter (gameNumber) = getInteger(this, gameFieldOrOddsBetGameCounterLabel(gameNumber)) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func getGameCounter () = getInteger(this, gameCounterLabel) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func getFirstPointDice (gameCounter) = getInteger(this, gameFirstPointDiceLabel(gameCounter)) | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func getCurrentPointDice (gameCounter) = match getInteger(this, gameCurrentPointDiceLabel(gameCounter)) { | |
155 | 155 | case val: Int => | |
156 | 156 | val | |
157 | 157 | case _ => | |
158 | 158 | 0 | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func validateBetName (betName) = if ((betName == PASSLINEBET)) | |
163 | 163 | then true | |
164 | 164 | else if ((betName == DONTPASSLINEBET)) | |
165 | 165 | then true | |
166 | 166 | else false | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func validateRoundBet (betName) = if ((betName == FIELDBET)) | |
170 | 170 | then true | |
171 | 171 | else if ((betName == ODDSBET)) | |
172 | 172 | then true | |
173 | 173 | else if ((betName == BIG6OR8BET)) | |
174 | 174 | then true | |
175 | 175 | else if ((betName == PLACEBETBUY)) | |
176 | 176 | then true | |
177 | 177 | else if ((betName == PLACEBETLAY)) | |
178 | 178 | then true | |
179 | 179 | else if ((betName == COMEBET)) | |
180 | 180 | then true | |
181 | 181 | else if ((betName == DONTCOMEBET)) | |
182 | 182 | then true | |
183 | 183 | else if ((betName == PLACEBETLOSE)) | |
184 | 184 | then true | |
185 | 185 | else if ((betName == PLACEBETWIN)) | |
186 | 186 | then true | |
187 | 187 | else false | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func getWinningAmountForOdds (amount,odd,resultOfRound) = if (if ((odd == 4)) | |
191 | 191 | then true | |
192 | 192 | else (odd == 10)) | |
193 | - | then { | |
194 | - | let winningAmount = (amount * 7) | |
195 | - | winningAmount | |
196 | - | } | |
193 | + | then (amount * 7) | |
197 | 194 | else if (if ((odd == 5)) | |
198 | 195 | then true | |
199 | 196 | else (odd == 8)) | |
200 | - | then { | |
201 | - | let winningAmount = (amount * 9) | |
202 | - | winningAmount | |
203 | - | } | |
197 | + | then (amount * 9) | |
204 | 198 | else if (if ((odd == 3)) | |
205 | 199 | then true | |
206 | 200 | else (odd == 11)) | |
207 | - | then { | |
208 | - | let winningAmount = (amount * 15) | |
209 | - | winningAmount | |
210 | - | } | |
201 | + | then (amount * 15) | |
211 | 202 | else if (if ((odd == 2)) | |
212 | 203 | then true | |
213 | 204 | else (odd == 12)) | |
214 | - | then { | |
215 | - | let winningAmount = (amount * 30) | |
216 | - | winningAmount | |
217 | - | } | |
205 | + | then (amount * 30) | |
218 | 206 | else if (if ((odd == 10)) | |
219 | 207 | then true | |
220 | 208 | else (odd == 4)) | |
221 | - | then { | |
222 | - | let winningAmount = (amount * 30) | |
223 | - | winningAmount | |
224 | - | } | |
209 | + | then (amount * 30) | |
225 | 210 | else if ((odd == 7)) | |
226 | - | then { | |
227 | - | let winningAmount = (amount * 4) | |
228 | - | winningAmount | |
229 | - | } | |
211 | + | then (amount * 4) | |
230 | 212 | else if (if ((odd == 100)) | |
231 | 213 | then if (if ((resultOfRound == 3)) | |
232 | 214 | then true | |
233 | 215 | else (resultOfRound == 12)) | |
234 | 216 | then true | |
235 | 217 | else (resultOfRound == 2) | |
236 | 218 | else false) | |
237 | - | then { | |
238 | - | let winningAmount = (amount * 7) | |
239 | - | winningAmount | |
240 | - | } | |
219 | + | then (amount * 7) | |
241 | 220 | else 0 | |
242 | 221 | ||
243 | 222 | ||
244 | 223 | func getWinningAmountForField (amount,resultOfRound) = if ((resultOfRound == 12)) | |
245 | - | then { | |
246 | - | let winningAmount = (amount * 4) | |
247 | - | winningAmount | |
248 | - | } | |
224 | + | then (amount * 4) | |
249 | 225 | else if ((resultOfRound == 2)) | |
250 | - | then { | |
251 | - | let winningAmount = (amount * 3) | |
252 | - | winningAmount | |
253 | - | } | |
226 | + | then (amount * 3) | |
254 | 227 | else if (if (if (if ((resultOfRound == 5)) | |
255 | 228 | then true | |
256 | 229 | else (resultOfRound == 6)) | |
257 | 230 | then true | |
258 | 231 | else (resultOfRound == 7)) | |
259 | 232 | then true | |
260 | 233 | else (resultOfRound == 8)) | |
261 | 234 | then 0 | |
262 | - | else { | |
263 | - | let winningAmount = (amount * 2) | |
264 | - | winningAmount | |
265 | - | } | |
235 | + | else (amount * 2) | |
266 | 236 | ||
267 | 237 | ||
268 | 238 | func storeOneRoundBetTypes (gameCounter,amount,typeBet,caller,odd) = match getGameTotalFieldOrOddsBets() { | |
269 | 239 | case betCount: Int => | |
270 | 240 | match getGameRollsCount(gameCounter) { | |
271 | 241 | case rollCount: Int => | |
272 | 242 | let newTotalBetCount = (betCount + 1) | |
273 | 243 | let newRollCountForGame = (rollCount + 1) | |
274 | 244 | if (if ((typeBet == COMEBET)) | |
275 | 245 | then true | |
276 | 246 | else (typeBet == DONTCOMEBET)) | |
277 | 247 | then [IntegerEntry(gameFieldOrOddsBetGameCounterLabel(newTotalBetCount), gameCounter), StringEntry(gameFieldOrOddsBetLineLabel(newTotalBetCount), ((((((((caller + "_") + amount) + "_") + typeBet) + "_active_pending_") + toString(gameCounter)) + "_") + toString(newRollCountForGame))), IntegerEntry(gameTotalFieldBetsLabel, newTotalBetCount), IntegerEntry(gameFieldOrOddsBetForNextThrowLabel(newTotalBetCount), newRollCountForGame)] | |
278 | 248 | else [IntegerEntry(gameFieldOrOddsBetGameCounterLabel(newTotalBetCount), gameCounter), StringEntry(gameFieldOrOddsBetLineLabel(newTotalBetCount), ((((((caller + "_") + amount) + "_") + typeBet) + "_active_pending_") + toString(odd))), IntegerEntry(gameTotalFieldBetsLabel, newTotalBetCount), IntegerEntry(gameFieldOrOddsBetForNextThrowLabel(newTotalBetCount), newRollCountForGame)] | |
279 | 249 | case _ => | |
280 | 250 | throw("Game doesn't exist") | |
281 | 251 | } | |
282 | 252 | case _ => | |
283 | 253 | throw("Game has not bee initialized") | |
284 | 254 | } | |
285 | 255 | ||
286 | 256 | ||
287 | 257 | func rollPlaceBetIntoAnotherRoundBet (totalBets,lastFieldProcessBet,betOnRoll,gameCounter,amount,typeBet,caller,odd) = [IntegerEntry(gameFieldOrOddsBetGameCounterLabel(totalBets), gameCounter), StringEntry(gameFieldOrOddsBetLineLabel(totalBets), ((((((caller + "_") + amount) + "_") + typeBet) + "_active_pending_") + toString(odd))), StringEntry(gameFieldOrOddsBetLineLabel(lastFieldProcessBet), ((((((caller + "_") + amount) + "_") + typeBet) + "_inactive_rolled_") + toString(odd))), IntegerEntry(gameTotalProccedFieldOrOddsBetsLabel, lastFieldProcessBet), IntegerEntry(gameTotalFieldBetsLabel, totalBets), IntegerEntry(gameFieldOrOddsBetForNextThrowLabel(totalBets), betOnRoll)] | |
288 | 258 | ||
289 | 259 | ||
290 | 260 | func storeNextRoll (gameState,amount,totalFieldBets,lastFieldProcessBet,betOnRoll,gameNumber,betType,betPlacer,odd) = if ((gameState == GAMEFINISHED)) | |
291 | 261 | then rollPlaceBetIntoAnotherRoundBet((totalFieldBets + 1), (lastFieldProcessBet + 1), 1, (gameNumber + 1), toString(amount), betType, betPlacer, odd) | |
292 | 262 | else rollPlaceBetIntoAnotherRoundBet((totalFieldBets + 1), (lastFieldProcessBet + 1), (betOnRoll + 1), gameNumber, toString(amount), betType, betPlacer, odd) | |
293 | 263 | ||
294 | 264 | ||
295 | - | func storeComeDontComeBet (gameState,betDetails,resultOfRound,amount,totalFieldBets,lastFieldProcessBet,betOnRoll,gameNumber,betType,betPlacer,odd) = { | |
296 | - | let comeBetGameNumber = value(parseInt(split(betDetails, "_")[5])) | |
297 | - | let comeBetRollNumber = value(parseInt(split(betDetails, "_")[6])) | |
298 | - | let resultOfGame = value(getGameRollDiceWithGameNumber(comeBetGameNumber, comeBetRollNumber)) | |
299 | - | if ((resultOfRound == 7)) | |
300 | - | then if ((betDetails == COMEBET)) | |
301 | - | then throw("Only Field Type of Bet can be proceed") | |
302 | - | else throw("Only Field Type of Bet can be proceed") | |
303 | - | else if ((resultOfRound == resultOfGame)) | |
304 | - | then throw("Only Field Type of Bet can be proceed") | |
305 | - | else if ((gameState == GAMEFINISHED)) | |
306 | - | then storeNextRoll(gameState, amount, (totalFieldBets + 1), (lastFieldProcessBet + 1), 1, (gameNumber + 1), betType, betPlacer, odd) | |
307 | - | else storeNextRoll(gameState, amount, (totalFieldBets + 1), (lastFieldProcessBet + 1), (betOnRoll + 1), gameNumber, betType, betPlacer, odd) | |
308 | - | } | |
309 | - | ||
310 | - | ||
311 | - | func storePassOrComeBet (gameCounter,amount,typeBet,caller) = match getGameTotalBets() { | |
265 | + | func storePassBet (gameCounter,amount,typeBet,caller) = match getGameTotalBets() { | |
312 | 266 | case number: Int => | |
313 | 267 | let newTotalBets = (number + 1) | |
314 | 268 | [IntegerEntry(gameBetCounterLabel(newTotalBets), gameCounter), StringEntry(gameBetLineLabel(newTotalBets), (((((caller + "_") + amount) + "_") + typeBet) + "_active_pending")), IntegerEntry(gameTotalBetsLabel, newTotalBets)] | |
315 | 269 | case _ => | |
316 | 270 | throw("Game has not bee initialized") | |
317 | 271 | } | |
318 | 272 | ||
319 | 273 | ||
320 | 274 | func udpateBetDetailsWithLost (updateBetDetials,gameNumber,lastProceedBet,betIndex,betProceedIndex) = { | |
321 | 275 | let updateInfoBet = (updateBetDetials + "_lost") | |
322 | 276 | [StringEntry(betIndex, updateInfoBet), IntegerEntry(betProceedIndex, lastProceedBet)] | |
323 | 277 | } | |
324 | 278 | ||
325 | 279 | ||
326 | 280 | func udpateBetDetailsWithLostWithOdd (updateBetDetials,gameNumber,lastProceedBet,betIndex,betProceedIndex,oddNumber) = { | |
327 | 281 | let updateInfoBet = ((updateBetDetials + "_lost_") + toString(oddNumber)) | |
328 | 282 | [StringEntry(betIndex, updateInfoBet), IntegerEntry(betProceedIndex, lastProceedBet)] | |
329 | 283 | } | |
330 | 284 | ||
331 | 285 | ||
332 | 286 | func updateBetDetailsWithWinning (updateBetDetials,gameNumber,currentProceedBet,betPlacer,winningAmount,betType,betIndex,betProceedIndex) = { | |
333 | 287 | let updateInfoBet = (updateBetDetials + "_won_") | |
334 | 288 | [StringEntry(gameWinningNumberBetLabel(gameNumber, currentProceedBet, betType), ((betPlacer + "_amount_") + toString(winningAmount))), StringEntry(betIndex, updateBetDetials), IntegerEntry(betProceedIndex, currentProceedBet), ScriptTransfer(value(addressFromString(betPlacer)), winningAmount, unit)] | |
335 | 289 | } | |
336 | 290 | ||
337 | 291 | ||
338 | 292 | func storeGameProgressPointState (storeIndex,gameNumber,number,rollCount,currentHeight,randomHash,state) = [IntegerEntry(gameStateLabel(gameNumber), state), IntegerEntry(storeIndex, number), IntegerEntry(gameRollsCountBetLabel(gameNumber), rollCount), IntegerEntry(gameEndHeightLabel(gameNumber), (currentHeight + BLOCKTOPROCESSFORTHROW)), StringEntry(gameRandomHashLabel(gameNumber), toBase64String(randomHash)), IntegerEntry(gameRollDiceWithGameNumberLabel(gameNumber, rollCount), number)] | |
339 | 293 | ||
340 | 294 | ||
295 | + | func getWinningAmountPassLineBets (firstPoint,lastPoint,betDetails) = { | |
296 | + | let betType = split(betDetails, "_")[2] | |
297 | + | let betPlacer = split(betDetails, "_")[0] | |
298 | + | let amount = value(parseInt(split(betDetails, "_")[1])) | |
299 | + | if ((betType == PASSLINEBET)) | |
300 | + | then if ((lastPoint == 0)) | |
301 | + | then if (if ((firstPoint == 7)) | |
302 | + | then true | |
303 | + | else (firstPoint == 11)) | |
304 | + | then (amount * 2) | |
305 | + | else 0 | |
306 | + | else if ((firstPoint == lastPoint)) | |
307 | + | then (amount * 2) | |
308 | + | else if ((lastPoint == 7)) | |
309 | + | then 0 | |
310 | + | else 0 | |
311 | + | else if ((betType == DONTPASSLINEBET)) | |
312 | + | then if ((lastPoint == 0)) | |
313 | + | then if (if ((firstPoint == 2)) | |
314 | + | then true | |
315 | + | else (firstPoint == 3)) | |
316 | + | then (amount * 2) | |
317 | + | else if (if ((lastPoint == 7)) | |
318 | + | then true | |
319 | + | else (lastPoint == 11)) | |
320 | + | then 0 | |
321 | + | else 0 | |
322 | + | else if (if ((lastPoint == 2)) | |
323 | + | then true | |
324 | + | else (lastPoint == 3)) | |
325 | + | then (amount * 2) | |
326 | + | else if ((lastPoint == 7)) | |
327 | + | then 0 | |
328 | + | else 0 | |
329 | + | else 0 | |
330 | + | } | |
331 | + | ||
332 | + | ||
333 | + | func getWinningAmountOneRoundBets (betDetails,resultOfRound,round) = { | |
334 | + | let betType = split(betDetails, "_")[2] | |
335 | + | let odd = value(parseInt(split(betDetails, "_")[5])) | |
336 | + | let amount = value(parseInt(split(betDetails, "_")[1])) | |
337 | + | if ((betType == FIELDBET)) | |
338 | + | then if ((resultOfRound == 12)) | |
339 | + | then (amount * 4) | |
340 | + | else if ((resultOfRound == 2)) | |
341 | + | then (amount * 3) | |
342 | + | else if (if (if (if ((resultOfRound == 5)) | |
343 | + | then true | |
344 | + | else (resultOfRound == 6)) | |
345 | + | then true | |
346 | + | else (resultOfRound == 7)) | |
347 | + | then true | |
348 | + | else (resultOfRound == 8)) | |
349 | + | then 0 | |
350 | + | else (amount * 2) | |
351 | + | else if ((betType == ODDSBET)) | |
352 | + | then if (if ((odd == 4)) | |
353 | + | then true | |
354 | + | else (odd == 10)) | |
355 | + | then (amount * 7) | |
356 | + | else if (if ((odd == 5)) | |
357 | + | then true | |
358 | + | else (odd == 8)) | |
359 | + | then (amount * 9) | |
360 | + | else if (if ((odd == 3)) | |
361 | + | then true | |
362 | + | else (odd == 11)) | |
363 | + | then (amount * 15) | |
364 | + | else if (if ((odd == 2)) | |
365 | + | then true | |
366 | + | else (odd == 12)) | |
367 | + | then (amount * 30) | |
368 | + | else if (if ((odd == 10)) | |
369 | + | then true | |
370 | + | else (odd == 4)) | |
371 | + | then (amount * 30) | |
372 | + | else if ((odd == 7)) | |
373 | + | then (amount * 4) | |
374 | + | else if (if ((odd == 100)) | |
375 | + | then if (if ((resultOfRound == 3)) | |
376 | + | then true | |
377 | + | else (resultOfRound == 12)) | |
378 | + | then true | |
379 | + | else (resultOfRound == 2) | |
380 | + | else false) | |
381 | + | then (amount * 7) | |
382 | + | else 0 | |
383 | + | else if ((betType == BIG6OR8BET)) | |
384 | + | then if (if ((resultOfRound == 6)) | |
385 | + | then true | |
386 | + | else (resultOfRound == 8)) | |
387 | + | then (2 * amount) | |
388 | + | else 0 | |
389 | + | else if (if ((betType == PLACEBETLAY)) | |
390 | + | then true | |
391 | + | else (betType == PLACEBETLOSE)) | |
392 | + | then if ((resultOfRound == 7)) | |
393 | + | then (amount * 2) | |
394 | + | else if ((resultOfRound == odd)) | |
395 | + | then 0 | |
396 | + | else -1 | |
397 | + | else if (if ((betType == PLACEBETBUY)) | |
398 | + | then true | |
399 | + | else (betType == PLACEBETWIN)) | |
400 | + | then if ((resultOfRound == 7)) | |
401 | + | then 0 | |
402 | + | else if ((resultOfRound == odd)) | |
403 | + | then (amount * 2) | |
404 | + | else -1 | |
405 | + | else if ((betType == COMEBET)) | |
406 | + | then { | |
407 | + | let playerPoint = value(parseInt(split(betDetails, "_")[6])) | |
408 | + | if ((round == 2)) | |
409 | + | then if (if ((resultOfRound == 7)) | |
410 | + | then true | |
411 | + | else (resultOfRound == 11)) | |
412 | + | then (amount * 2) | |
413 | + | else if (if (if ((resultOfRound == 2)) | |
414 | + | then true | |
415 | + | else (resultOfRound == 12)) | |
416 | + | then true | |
417 | + | else (resultOfRound == 3)) | |
418 | + | then 0 | |
419 | + | else if ((resultOfRound == playerPoint)) | |
420 | + | then (amount * 2) | |
421 | + | else -1 | |
422 | + | else if ((round > 2)) | |
423 | + | then if ((resultOfRound == 7)) | |
424 | + | then 0 | |
425 | + | else if ((resultOfRound == playerPoint)) | |
426 | + | then (amount * 2) | |
427 | + | else -1 | |
428 | + | else throw("Not Allow in The Beginning") | |
429 | + | } | |
430 | + | else if ((betType == DONTCOMEBET)) | |
431 | + | then { | |
432 | + | let playerPoint = value(parseInt(split(betDetails, "_")[6])) | |
433 | + | if ((round == 2)) | |
434 | + | then if (if ((resultOfRound == 7)) | |
435 | + | then true | |
436 | + | else (resultOfRound == 11)) | |
437 | + | then 0 | |
438 | + | else if (if (if ((resultOfRound == 2)) | |
439 | + | then true | |
440 | + | else (resultOfRound == 12)) | |
441 | + | then true | |
442 | + | else (resultOfRound == 3)) | |
443 | + | then (amount * 2) | |
444 | + | else if ((resultOfRound == playerPoint)) | |
445 | + | then (amount * 2) | |
446 | + | else -1 | |
447 | + | else if ((round > 1)) | |
448 | + | then if ((resultOfRound == 7)) | |
449 | + | then (amount * 2) | |
450 | + | else if ((resultOfRound == playerPoint)) | |
451 | + | then 0 | |
452 | + | else -1 | |
453 | + | else throw("Not Allow in The Beginning") | |
454 | + | } | |
455 | + | else 0 | |
456 | + | } | |
457 | + | ||
458 | + | ||
341 | 459 | @Callable(i) | |
342 | 460 | func processNextBet () = if (authorizePermission(i.callerPublicKey)) | |
343 | 461 | then throw("processFieldBet_FORBIDDEN") | |
344 | 462 | else match getGameTotalBets() { | |
345 | 463 | case totalBets: Int => | |
346 | 464 | match getGameProcessedBets() { | |
347 | 465 | case lastProcessBet: Int => | |
348 | 466 | let nextBet = (lastProcessBet + 1) | |
349 | 467 | if ((nextBet > totalBets)) | |
350 | 468 | then throw("Next bet has not been places.") | |
351 | 469 | else match getGameBetCounter(nextBet) { | |
352 | 470 | case gameNumber: Int => | |
353 | 471 | match getGameState(gameNumber) { | |
354 | 472 | case gameState: Int => | |
355 | 473 | if (if ((gameState == GAMESTART)) | |
356 | 474 | then true | |
357 | 475 | else (gameState == GAMEINPROGRESS)) | |
358 | 476 | then throw("Game has to finished in order to process NON-FIELD bets") | |
359 | 477 | else { | |
360 | 478 | let betDetails = value(getBetDetailsResult(nextBet)) | |
361 | - | let betType = split(betDetails, "_")[2] | |
362 | - | let betPlacer = split(betDetails, "_")[0] | |
363 | - | let amount = value(parseInt(split(betDetails, "_")[1])) | |
364 | - | let address = value(addressFromString(betPlacer)) | |
479 | + | let address = value(addressFromString(split(betDetails, "_")[0])) | |
365 | 480 | let currentPoint = getCurrentPointDice(nextBet) | |
366 | - | let firstPoint = getFirstPointDice(nextBet) | |
367 | - | let updateBetDetials = (((((betPlacer + "_") + split(betDetails, "_")[1]) + "_") + split(betDetails, "_")[2]) + "_inactive_") | |
368 | - | if ((betType == PASSLINEBET)) | |
369 | - | then if ((currentPoint == 0)) | |
370 | - | then if (if ((firstPoint == 7)) | |
371 | - | then true | |
372 | - | else (firstPoint == 11)) | |
373 | - | then { | |
374 | - | let winningAmount = (amount * 2) | |
375 | - | updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, betPlacer, winningAmount, betType, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
376 | - | } | |
377 | - | else udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
378 | - | else if ((firstPoint == currentPoint)) | |
379 | - | then { | |
380 | - | let winningAmount = (amount * 2) | |
381 | - | updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, betPlacer, winningAmount, betType, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
382 | - | } | |
383 | - | else if ((currentPoint == 7)) | |
384 | - | then udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
385 | - | else udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
386 | - | else if ((betType == DONTPASSLINEBET)) | |
387 | - | then if ((currentPoint == 0)) | |
388 | - | then if (if ((firstPoint == 2)) | |
389 | - | then true | |
390 | - | else (firstPoint == 3)) | |
391 | - | then { | |
392 | - | let winningAmount = (amount * 2) | |
393 | - | updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, betPlacer, winningAmount, betType, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
394 | - | } | |
395 | - | else if (if ((currentPoint == 7)) | |
396 | - | then true | |
397 | - | else (currentPoint == 11)) | |
398 | - | then udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
399 | - | else udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
400 | - | else if (if ((currentPoint == 2)) | |
401 | - | then true | |
402 | - | else (currentPoint == 3)) | |
403 | - | then { | |
404 | - | let winningAmount = (amount * 2) | |
405 | - | updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, betPlacer, winningAmount, betType, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
406 | - | } | |
407 | - | else if ((currentPoint == 7)) | |
408 | - | then udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
409 | - | else udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
410 | - | else throw((((((("Only " + PASSLINEBET) + ", ") + DONTPASSLINEBET) + " allowed in processNextBet()") + " currentBetType ") + betType)) | |
481 | + | let firstPoint = value(getFirstPointDice(nextBet)) | |
482 | + | let updateBetDetials = (((((split(betDetails, "_")[0] + "_") + split(betDetails, "_")[1]) + "_") + split(betDetails, "_")[2]) + "_inactive_") | |
483 | + | let winningAmountResult = getWinningAmountPassLineBets(firstPoint, currentPoint, betDetails) | |
484 | + | if ((winningAmountResult == 0)) | |
485 | + | then udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
486 | + | else if ((winningAmountResult > 0)) | |
487 | + | then updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, split(betDetails, "_")[0], winningAmountResult, split(betDetails, "_")[2], gameBetLineLabel(nextBet), gameTotalProccedBetsLabel) | |
488 | + | else throw((((((("Only " + PASSLINEBET) + ", ") + DONTPASSLINEBET) + " allowed in processNextBet()") + " currentBetType ") + split(betDetails, "_")[2])) | |
411 | 489 | } | |
412 | 490 | case _ => | |
413 | 491 | throw("Game does not exist or has already ended.") | |
414 | 492 | } | |
415 | 493 | case _ => | |
416 | 494 | throw("Error") | |
417 | 495 | } | |
418 | 496 | case _ => | |
419 | 497 | throw("Game has not been initialized, next bets not found") | |
420 | 498 | } | |
421 | 499 | case _ => | |
422 | 500 | throw("Game has not been initialized, next bets not found") | |
423 | 501 | } | |
424 | 502 | ||
425 | 503 | ||
426 | 504 | ||
427 | 505 | @Callable(i) | |
428 | 506 | func processOneRoundBet () = if (authorizePermission(i.callerPublicKey)) | |
429 | 507 | then throw("processFieldBet_FORBIDDEN") | |
430 | 508 | else match getGameTotalFieldOrOddsBets() { | |
431 | 509 | case totalFieldBets: Int => | |
432 | 510 | match getGameProcessedFieldOrOddsBets() { | |
433 | 511 | case lastFieldProcessBet: Int => | |
434 | 512 | let nextBet = (lastFieldProcessBet + 1) | |
435 | 513 | if ((nextBet > totalFieldBets)) | |
436 | 514 | then throw("Next Field Bet has not been places.") | |
437 | 515 | else match getGameFieldOrOddsBetCounter(nextBet) { | |
438 | 516 | case gameNumber: Int => | |
439 | 517 | match getGameState(gameNumber) { | |
440 | 518 | case gameState: Int => | |
441 | 519 | if ((gameState == GAMESTART)) | |
442 | 520 | then throw("Game has not started yet") | |
443 | 521 | else { | |
444 | 522 | let betDetails = value(getFieldBetDetailsResult(nextBet)) | |
445 | 523 | let betType = split(betDetails, "_")[2] | |
446 | 524 | let betPlacer = split(betDetails, "_")[0] | |
447 | 525 | let amount = value(parseInt(split(betDetails, "_")[1])) | |
448 | 526 | let odd = value(parseInt(split(betDetails, "_")[5])) | |
449 | 527 | let address = value(addressFromString(betPlacer)) | |
450 | 528 | let betOnRoll = value(getFieldOddsBetForNextDice(nextBet)) | |
529 | + | let updateBetDetials = (((((betPlacer + "_") + split(betDetails, "_")[1]) + "_") + split(betDetails, "_")[2]) + "_inactive_") | |
451 | 530 | match getGameRollDiceWithGameNumber(gameNumber, betOnRoll) { | |
452 | 531 | case resultOfRound: Int => | |
453 | - | let updateBetDetials = (((((betPlacer + "_") + split(betDetails, "_")[1]) + "_") + split(betDetails, "_")[2]) + "_inactive_") | |
454 | - | if ((betType == FIELDBET)) | |
455 | - | then { | |
456 | - | let winningAmount = getWinningAmountForField(amount, resultOfRound) | |
457 | - | if ((winningAmount == 0)) | |
458 | - | then udpateBetDetailsWithLost(updateBetDetials, gameNumber, nextBet, gameFieldOrOddsBetLineLabel(gameNumber), gameTotalProccedFieldOrOddsBetsLabel) | |
459 | - | else updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, betPlacer, winningAmount, betType, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel) | |
460 | - | } | |
461 | - | else if ((betType == ODDSBET)) | |
462 | - | then { | |
463 | - | let winningAmount = getWinningAmountForOdds(amount, odd, resultOfRound) | |
464 | - | if ((winningAmount == 0)) | |
465 | - | then updateBetDetailsWithWinning((updateBetDetials + "_won_"), gameNumber, nextBet, betPlacer, winningAmount, betType, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel) | |
466 | - | else udpateBetDetailsWithLostWithOdd(updateBetDetials, gameNumber, nextBet, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel, odd) | |
467 | - | } | |
468 | - | else if ((betType == BIG6OR8BET)) | |
469 | - | then if (if ((resultOfRound == 6)) | |
470 | - | then true | |
471 | - | else (resultOfRound == 8)) | |
472 | - | then { | |
473 | - | let winningAmount = (2 * amount) | |
474 | - | updateBetDetailsWithWinning((updateBetDetials + "_won_"), gameNumber, nextBet, betPlacer, winningAmount, betType, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel) | |
475 | - | } | |
476 | - | else udpateBetDetailsWithLostWithOdd(updateBetDetials, gameNumber, nextBet, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel, odd) | |
477 | - | else if (if ((betType == PLACEBETBUY)) | |
478 | - | then true | |
479 | - | else (betType == PLACEBETWIN)) | |
480 | - | then if ((resultOfRound == 7)) | |
481 | - | then udpateBetDetailsWithLostWithOdd(updateBetDetials, gameNumber, nextBet, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel, odd) | |
482 | - | else if ((resultOfRound == odd)) | |
483 | - | then { | |
484 | - | let winningAmount = (amount * 2) | |
485 | - | updateBetDetailsWithWinning((updateBetDetials + "_won_"), gameNumber, nextBet, betPlacer, winningAmount, betType, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel) | |
486 | - | } | |
487 | - | else storeNextRoll(gameState, amount, (totalFieldBets + 1), (lastFieldProcessBet + 1), 1, (gameNumber + 1), betType, betPlacer, odd) | |
488 | - | else if (if ((betType == PLACEBETLAY)) | |
489 | - | then true | |
490 | - | else (betType == PLACEBETLOSE)) | |
491 | - | then if ((resultOfRound == 7)) | |
492 | - | then { | |
493 | - | let winningAmount = (amount * 2) | |
494 | - | updateBetDetailsWithWinning(updateBetDetials, gameNumber, nextBet, betPlacer, winningAmount, betType, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel) | |
495 | - | } | |
496 | - | else if ((resultOfRound == odd)) | |
497 | - | then udpateBetDetailsWithLostWithOdd(updateBetDetials, gameNumber, nextBet, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel, odd) | |
498 | - | else storeNextRoll(gameState, amount, (totalFieldBets + 1), (lastFieldProcessBet + 1), 1, (gameNumber + 1), betType, betPlacer, odd) | |
499 | - | else if (if ((betType == COMEBET)) | |
500 | - | then true | |
501 | - | else (betType == DONTCOMEBET)) | |
502 | - | then storeComeDontComeBet(gameState, betDetails, resultOfRound, amount, totalFieldBets, lastFieldProcessBet, betOnRoll, gameNumber, betType, betPlacer, odd) | |
503 | - | else throw("Only Field Type of Bet can be proceed") | |
532 | + | let roundRole = value(parseInt(gameRollsCountBetLabel(gameNumber))) | |
533 | + | let winningAmountOneRoundBet = getWinningAmountOneRoundBets(betDetails, resultOfRound, roundRole) | |
534 | + | if ((winningAmountOneRoundBet == -1)) | |
535 | + | then storeNextRoll(gameState, amount, totalFieldBets, lastFieldProcessBet, betOnRoll, gameNumber, betType, betPlacer, odd) | |
536 | + | else if ((winningAmountOneRoundBet == 0)) | |
537 | + | then udpateBetDetailsWithLostWithOdd(updateBetDetials, gameNumber, nextBet, gameFieldOrOddsBetLineLabel(gameNumber), gameTotalProccedFieldOrOddsBetsLabel, odd) | |
538 | + | else updateBetDetailsWithWinning((updateBetDetials + "_won_"), gameNumber, nextBet, betPlacer, winningAmountOneRoundBet, betType, gameFieldOrOddsBetLineLabel(nextBet), gameTotalProccedFieldOrOddsBetsLabel) | |
504 | 539 | case _ => | |
505 | 540 | throw("There is no result for this round yet") | |
506 | 541 | } | |
507 | 542 | } | |
508 | 543 | case _ => | |
509 | 544 | throw("Game does not exist or has already ended") | |
510 | 545 | } | |
511 | 546 | case _ => | |
512 | 547 | throw("Error") | |
513 | 548 | } | |
514 | 549 | case _ => | |
515 | 550 | throw("Game has not been initialized, next bets not found") | |
516 | 551 | } | |
517 | 552 | case _ => | |
518 | 553 | throw("Game has not been initialized, next bets not found") | |
519 | 554 | } | |
520 | 555 | ||
521 | 556 | ||
522 | 557 | ||
523 | 558 | @Callable(i) | |
524 | 559 | func initGame () = if (authorizePermission(i.callerPublicKey)) | |
525 | 560 | then throw("initGame_FORBIDDEN") | |
526 | 561 | else match getGameCounter() { | |
527 | 562 | case counter: Int => | |
528 | 563 | throw("INIT_ALREADY_DONE") | |
529 | 564 | case _ => | |
530 | 565 | [IntegerEntry(gameCounterLabel, 0), IntegerEntry(gameTotalBetsLabel, 0), IntegerEntry(gameTotalProccedBetsLabel, 0), IntegerEntry(gameTotalFieldBetsLabel, 0), IntegerEntry(gameTotalProccedFieldOrOddsBetsLabel, 0)] | |
531 | 566 | } | |
532 | 567 | ||
533 | 568 | ||
534 | 569 | ||
535 | 570 | @Callable(i) | |
536 | 571 | func startGame (randomHash) = if (authorizePermission(i.callerPublicKey)) | |
537 | 572 | then throw("startGame_FORBIDDEN") | |
538 | 573 | else match getGameCounter() { | |
539 | 574 | case number: Int => | |
540 | 575 | if ((number == 0)) | |
541 | 576 | then { | |
542 | 577 | let newNumber = (number + 1) | |
543 | 578 | [IntegerEntry(gameCounterLabel, newNumber), IntegerEntry(gameStateLabel(newNumber), GAMESTART), IntegerEntry(gameStartHeightLabel(newNumber), lastBlock.height), IntegerEntry(gameEndHeightLabel(newNumber), (lastBlock.height + BLOCKTOPROCESSFORTHROW)), IntegerEntry(gameRollsCountBetLabel(newNumber), 0), StringEntry(gameSumShaLabel(newNumber), toBase58String(sha256(fromBase64String(randomHash))))] | |
544 | 579 | } | |
545 | 580 | else match getGameState(number) { | |
546 | 581 | case state: Int => | |
547 | 582 | if (if ((state == GAMEINPROGRESS)) | |
548 | 583 | then true | |
549 | 584 | else (state == GAMESTART)) | |
550 | 585 | then throw("The previous game is still in progress") | |
551 | 586 | else { | |
552 | 587 | let newNumber = (number + 1) | |
553 | 588 | [IntegerEntry(gameCounterLabel, newNumber), IntegerEntry(gameStateLabel(newNumber), GAMESTART), IntegerEntry(gameStartHeightLabel(newNumber), lastBlock.height), IntegerEntry(gameEndHeightLabel(newNumber), (lastBlock.height + BLOCKTOPROCESSFORTHROW)), IntegerEntry(gameRollsCountBetLabel(newNumber), 0), StringEntry(gameSumShaLabel(newNumber), toBase58String(sha256(fromBase64String(randomHash))))] | |
554 | 589 | } | |
555 | 590 | case _ => | |
556 | 591 | throw("Error") | |
557 | 592 | } | |
558 | 593 | case _ => | |
559 | 594 | throw("INIT_NEED") | |
560 | 595 | } | |
561 | 596 | ||
562 | 597 | ||
563 | 598 | ||
564 | 599 | @Callable(i) | |
565 | 600 | func placeBet (typeBet) = if (validateBetName(typeBet)) | |
566 | 601 | then if ((size(i.payments) == 0)) | |
567 | 602 | then throw("Payment not attached") | |
568 | 603 | else match getGameCounter() { | |
569 | 604 | case GAMENUMBER: Int => | |
570 | 605 | let p = i.payments[0] | |
571 | 606 | match getGameState(GAMENUMBER) { | |
572 | 607 | case state: Int => | |
573 | 608 | if ((state == GAMESTART)) | |
574 | 609 | then if (if ((typeBet == PASSLINEBET)) | |
575 | 610 | then true | |
576 | 611 | else (typeBet == DONTPASSLINEBET)) | |
577 | - | then | |
612 | + | then storePassBet(GAMENUMBER, toString(p.amount), typeBet, toBase58String(i.caller.bytes)) | |
578 | 613 | else throw((((((("Only " + PASSLINEBET) + ", ") + DONTPASSLINEBET) + " and ") + FIELDBET) + " are allowed in the Beginning of Game")) | |
579 | 614 | else if ((state == GAMEINPROGRESS)) | |
580 | 615 | then throw((((((("Only " + COMEBET) + ", ") + DONTCOMEBET) + " and ") + FIELDBET) + " ARE ALLOWED at Start.")) | |
581 | 616 | else if ((state == GAMEFINISHED)) | |
582 | 617 | then throw("Game already ended.") | |
583 | 618 | else throw("Unknown Game State.") | |
584 | 619 | case _ => | |
585 | 620 | throw("Game does not exist or has already ended.") | |
586 | 621 | } | |
587 | 622 | case _ => | |
588 | 623 | throw("Game has not been initialized.") | |
589 | 624 | } | |
590 | 625 | else throw(((((((((("Unsupported Type of Bet for Crap. Please Select one of " + PASSLINEBET) + ", ") + DONTPASSLINEBET) + ", ") + COMEBET) + ", ") + DONTCOMEBET) + ", ") + FIELDBET)) | |
591 | 626 | ||
592 | 627 | ||
593 | 628 | ||
594 | 629 | @Callable(i) | |
595 | 630 | func placeRoundBet (typeBet,oddNumber) = if (validateRoundBet(typeBet)) | |
596 | 631 | then if ((size(i.payments) == 0)) | |
597 | 632 | then throw("Payment not attached") | |
598 | 633 | else match getGameCounter() { | |
599 | 634 | case GAMENUMBER: Int => | |
600 | 635 | let p = i.payments[0] | |
601 | 636 | match getGameState(GAMENUMBER) { | |
602 | 637 | case state: Int => | |
603 | 638 | if ((state == GAMEFINISHED)) | |
604 | 639 | then throw("Game already ended.") | |
605 | 640 | else if (if ((typeBet == COMEBET)) | |
606 | 641 | then true | |
607 | 642 | else (typeBet == DONTCOMEBET)) | |
608 | 643 | then if ((state == GAMESTART)) | |
609 | 644 | then throw("Cannot place COME OR DONTCOME BET IF GAME HAS NOT STARTED") | |
610 | 645 | else storeOneRoundBetTypes(GAMENUMBER, toString(p.amount), typeBet, toBase58String(i.caller.bytes), 0) | |
611 | 646 | else storeOneRoundBetTypes(GAMENUMBER, toString(p.amount), typeBet, toBase58String(i.caller.bytes), oddNumber) | |
612 | 647 | case _ => | |
613 | 648 | throw("Game does not exist or has already ended.") | |
614 | 649 | } | |
615 | 650 | case _ => | |
616 | 651 | throw("Game has not been initialized.") | |
617 | 652 | } | |
618 | 653 | else throw(((((((((("Unsupported Type of Bet for Crap. Please Select one of " + ODDSBET) + ", ") + DONTPASSLINEBET) + ", ") + COMEBET) + ", ") + DONTCOMEBET) + ", ") + FIELDBET)) | |
619 | 654 | ||
620 | 655 | ||
621 | 656 | ||
622 | 657 | @Callable(i) | |
623 | 658 | func throwDices (rsaSign,gameNumber) = if (authorizePermission(i.callerPublicKey)) | |
624 | 659 | then throw("throwDices_FORBIDDEN") | |
625 | 660 | else match getGameState(gameNumber) { | |
626 | 661 | case state: Int => | |
627 | 662 | if ((state == GAMEFINISHED)) | |
628 | 663 | then throw("Game is finished") | |
629 | 664 | else { | |
630 | 665 | let currentHeight = lastBlock.height | |
631 | 666 | let lastHeightAllowed = value(getEndHeight(gameNumber)) | |
632 | 667 | if ((currentHeight >= lastHeightAllowed)) | |
633 | 668 | then match getGameSumSha(gameNumber) { | |
634 | 669 | case sumSha: String => | |
635 | 670 | let sig = fromBase64String(rsaSign) | |
636 | 671 | let rsaSigValid = rsaVerify(SHA256, fromBase58String(sumSha), sig, RSAPUBLIC) | |
637 | 672 | match blockInfoByHeight((lastBlock.height - 1)) { | |
638 | 673 | case previousBlock: BlockInfo => | |
639 | 674 | let randomHash = sha256((take(sig, 4) + take(previousBlock.generationSignature, 8))) | |
640 | 675 | if (!(rsaSigValid)) | |
641 | 676 | then throw("INVALID_RSA_SIGN") | |
642 | 677 | else { | |
643 | 678 | let randNumber = (toInt(randomHash) % 11) | |
644 | 679 | let number = diceNumber[randNumber] | |
645 | 680 | match getGameRollsCount(gameNumber) { | |
646 | 681 | case rollCountNumber: Int => | |
647 | 682 | let newRollCountNumber = (rollCountNumber + 1) | |
648 | 683 | if ((state == GAMESTART)) | |
649 | 684 | then if (if (if (if (if ((number == 7)) | |
650 | 685 | then true | |
651 | 686 | else (number == 11)) | |
652 | 687 | then true | |
653 | 688 | else (number == 2)) | |
654 | 689 | then true | |
655 | 690 | else (number == 3)) | |
656 | 691 | then true | |
657 | 692 | else (number == 12)) | |
658 | 693 | then storeGameProgressPointState(gameFirstPointDiceLabel(gameNumber), gameNumber, number, newRollCountNumber, currentHeight, randomHash, GAMEFINISHED) | |
659 | 694 | else storeGameProgressPointState(gameFirstPointDiceLabel(gameNumber), gameNumber, number, newRollCountNumber, currentHeight, randomHash, GAMEINPROGRESS) | |
660 | 695 | else { | |
661 | 696 | let currentPoint = value(getCurrentPointDice(gameNumber)) | |
662 | 697 | let firstPoint = value(getFirstPointDice(gameNumber)) | |
663 | 698 | if ((currentPoint == 0)) | |
664 | 699 | then if (if ((number == 7)) | |
665 | 700 | then true | |
666 | 701 | else (firstPoint == number)) | |
667 | 702 | then storeGameProgressPointState(gameCurrentPointDiceLabel(gameNumber), gameNumber, number, newRollCountNumber, currentHeight, randomHash, GAMEFINISHED) | |
668 | 703 | else storeGameProgressPointState(gameCurrentPointDiceLabel(gameNumber), gameNumber, number, newRollCountNumber, currentHeight, randomHash, GAMEINPROGRESS) | |
669 | 704 | else if (if ((number == 7)) | |
670 | 705 | then true | |
671 | 706 | else (firstPoint == number)) | |
672 | 707 | then storeGameProgressPointState(gameCurrentPointDiceLabel(gameNumber), gameNumber, number, newRollCountNumber, currentHeight, randomHash, GAMEFINISHED) | |
673 | 708 | else storeGameProgressPointState(gameCurrentPointDiceLabel(gameNumber), gameNumber, number, newRollCountNumber, currentHeight, randomHash, GAMEINPROGRESS) | |
674 | 709 | } | |
675 | 710 | case _ => | |
676 | 711 | throw("No dices have been thrown") | |
677 | 712 | } | |
678 | 713 | } | |
679 | 714 | case _ => | |
680 | 715 | throw("Last block doesn't exist.") | |
681 | 716 | } | |
682 | 717 | case _ => | |
683 | 718 | throw("SHA doesn't exist") | |
684 | 719 | } | |
685 | 720 | else throw("Throw dice not allow still waiting for block to process") | |
686 | 721 | } | |
687 | 722 | case _ => | |
688 | 723 | throw("Game does not exist or has already ended.") | |
689 | 724 | } | |
690 | 725 | ||
691 | 726 | ||
692 | 727 | @Verifier(tx) | |
693 | 728 | func verify () = match tx { | |
694 | 729 | case _ => | |
695 | 730 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
696 | 731 | } | |
697 | 732 |
github/deemru/w8io/169f3d6 79.54 ms ◑