tx · 5kKpi5KFb2ywKL2ajeWhRUbrGABP875UznwWfPJGif5b

3Mth4mJpNbm6N6PQsgnP5KzcHBfC2Luiyfs:  -0.01400000 Waves

2019.07.31 15:08 [610247] smart account 3Mth4mJpNbm6N6PQsgnP5KzcHBfC2Luiyfs > SELF 0.00000000 Waves

{ "type": 13, "id": "5kKpi5KFb2ywKL2ajeWhRUbrGABP875UznwWfPJGif5b", "fee": 1400000, "feeAssetId": null, "timestamp": 1564574957739, "version": 1, "sender": "3Mth4mJpNbm6N6PQsgnP5KzcHBfC2Luiyfs", "senderPublicKey": "GL5QvqgydTUCg1sj1s7juR6hVfxLHjZ37Kr5sAX4D4an", "proofs": [ "5RwBkkQTLUDLtuj1N6CzVcxqcaH6SzpehLrKoHtXCn7hagxqXvCpMvBbFgM1jtf9jQ3GXNGdhUXqf1ip5TuruyTP" ], "script": "base64:AAIDAAAAAAAAAAAAAAAIAQAAAAlmaXZlQ2hhcnMAAAABAAAAAWMJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAABYwUAAAABYwUAAAABYwUAAAABYwUAAAABYwEAAAAEY2VsbAAAAAMAAAAFY2VsbHMAAAADcm93AAAAA2NvbAkBAAAACXRha2VSaWdodAAAAAIJAAEvAAAAAgUAAAAFY2VsbHMJAABkAAAAAgkAAGQAAAACCQAAaAAAAAIFAAAAA3JvdwAAAAAAAAAADwUAAAADY29sAAAAAAAAAAABAAAAAAAAAAABAQAAAAdzZXRDZWxsAAAABAAAAAVjZWxscwAAAANyb3cAAAADY29sAAAAA3ZhbAkAASwAAAACCQABLAAAAAIJAAEvAAAAAgUAAAAFY2VsbHMJAABkAAAAAgkAAGgAAAACBQAAAANyb3cAAAAAAAAAAA8FAAAAA2NvbAUAAAADdmFsCQEAAAAJdGFrZVJpZ2h0AAAAAgUAAAAFY2VsbHMJAABlAAAAAgkAATEAAAABBQAAAAVjZWxscwkAAGQAAAACCQAAZAAAAAIJAABoAAAAAgUAAAADcm93AAAAA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AAAAWkBAAAAC3Rlc3RTZXRDZWxsAAAABAAAAARnYW1lAAAAA3JvdwAAAANjb2wAAAADdmFsBAAAAAVjZWxscwkBAAAAB2V4dHJhY3QAAAABCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgkAASwAAAACAgAAAAVnYW1lOgkAAaQAAAABBQAAAARnYW1lAgAAAAZfY2VsbHMEAAAACG5ld0NlbGxzCQEAAAAHc2V0Q2VsbAAAAAQFAAAABWNlbGxzBQAAAANyb3cFAAAAA2NvbAUAAAADdmFsCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAFZ2FtZToJAAGkAAAAAQUAAAAEZ2FtZQIAAAAGX2NlbGxzBQAAAAhuZXdDZWxscwUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAbQtHJt", "chainId": 84, "height": 610247, "spentComplexity": 0 } View: original | compacted Prev: EDqrMca5rAySMJjE8azrGFXS73Gx7VyjR6L7ExoccpBq Next: Ak3tnHVv23gpDBkCXy8WDUkaeTHuUa88eBr1A8jMBmoY Diff:
OldNewDifferences
77 func cell (cells,row,col) = takeRight(take(cells, (((row * 15) + col) + 1)), 1)
88
99
10-func setCell (cells,row,col,val) = ((take(cells, ((row * 15) + col)) + val) + take(cells, (size(cells) - (((row * 15) + col) + 1))))
10+func setCell (cells,row,col,val) = ((take(cells, ((row * 15) + col)) + val) + takeRight(cells, (size(cells) - (((row * 15) + col) + 1))))
1111
1212
1313 func row (cells,row) = ((((((((((((((cell(cells, row, 0) + cell(cells, row, 1)) + cell(cells, row, 2)) + cell(cells, row, 3)) + cell(cells, row, 4)) + cell(cells, row, 5)) + cell(cells, row, 6)) + cell(cells, row, 7)) + cell(cells, row, 8)) + cell(cells, row, 9)) + cell(cells, row, 10)) + cell(cells, row, 11)) + cell(cells, row, 12)) + cell(cells, row, 13)) + cell(cells, row, 14))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func fiveChars (c) = ((((c + c) + c) + c) + c)
55
66
77 func cell (cells,row,col) = takeRight(take(cells, (((row * 15) + col) + 1)), 1)
88
99
10-func setCell (cells,row,col,val) = ((take(cells, ((row * 15) + col)) + val) + take(cells, (size(cells) - (((row * 15) + col) + 1))))
10+func setCell (cells,row,col,val) = ((take(cells, ((row * 15) + col)) + val) + takeRight(cells, (size(cells) - (((row * 15) + col) + 1))))
1111
1212
1313 func row (cells,row) = ((((((((((((((cell(cells, row, 0) + cell(cells, row, 1)) + cell(cells, row, 2)) + cell(cells, row, 3)) + cell(cells, row, 4)) + cell(cells, row, 5)) + cell(cells, row, 6)) + cell(cells, row, 7)) + cell(cells, row, 8)) + cell(cells, row, 9)) + cell(cells, row, 10)) + cell(cells, row, 11)) + cell(cells, row, 12)) + cell(cells, row, 13)) + cell(cells, row, 14))
1414
1515
1616 func column (cells,col) = ((((((((((((((cell(cells, 0, col) + cell(cells, 1, col)) + cell(cells, 2, col)) + cell(cells, 3, col)) + cell(cells, 4, col)) + cell(cells, 5, col)) + cell(cells, 6, col)) + cell(cells, 7, col)) + cell(cells, 8, col)) + cell(cells, 9, col)) + cell(cells, 10, col)) + cell(cells, 11, col)) + cell(cells, 12, col)) + cell(cells, 13, col)) + cell(cells, 14, col))
1717
1818
1919 func diagHelper (cells,d,dir,i) = if ((dir == "R"))
2020 then if (if ((d >= i))
2121 then ((14 + i) >= d)
2222 else false)
2323 then cell(cells, i, (d - i))
2424 else ""
2525 else if ((dir == "L"))
2626 then if (if ((d >= i))
2727 then ((14 + i) >= d)
2828 else false)
2929 then cell(cells, (d - i), (14 - i))
3030 else ""
3131 else throw("invalid dir in diagHelper function")
3232
3333
3434 func diag (cells,d,dir) = ((((((((((((((diagHelper(cells, d, dir, 14) + diagHelper(cells, d, dir, 13)) + diagHelper(cells, d, dir, 12)) + diagHelper(cells, d, dir, 11)) + diagHelper(cells, d, dir, 10)) + diagHelper(cells, d, dir, 9)) + diagHelper(cells, d, dir, 8)) + diagHelper(cells, d, dir, 7)) + diagHelper(cells, d, dir, 6)) + diagHelper(cells, d, dir, 5)) + diagHelper(cells, d, dir, 4)) + diagHelper(cells, d, dir, 3)) + diagHelper(cells, d, dir, 2)) + diagHelper(cells, d, dir, 1)) + diagHelper(cells, d, dir, 0))
3535
3636
3737 func check (line,c) = if (if ((c != "b"))
3838 then (c != "w")
3939 else false)
4040 then throw("invalid color in check function")
4141 else match indexOf(line, fiveChars(c)) {
4242 case _: Int =>
4343 true
4444 case _ =>
4545 false
4646 }
4747
4848
4949 @Callable(i)
5050 func test (game,d,dir) = {
5151 let cells = extract(getString(this, (("game:" + toString(game)) + "_cells")))
5252 throw(diag(cells, d, dir))
5353 }
5454
5555
5656
5757 @Callable(i)
5858 func testSetCell (game,row,col,val) = {
5959 let cells = extract(getString(this, (("game:" + toString(game)) + "_cells")))
6060 let newCells = setCell(cells, row, col, val)
6161 WriteSet([DataEntry((("game:" + toString(game)) + "_cells"), newCells)])
6262 }
6363
6464
6565 @Verifier(tx)
6666 func verify () = true
6767

github/deemru/w8io/026f985 
26.21 ms