Transaction 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa

1 Input
  • e450ed77a9384931c690e9570e57ede0eeedfea62acc9fa750d9258570bf23e4:0
    OP_DATA_32(32) 117f692257b2331233b5705ce9c682be8719ff1b2b64cbca290bd6faeb54423e
    OP_CHECKSIG(172)
    OP_DATA_6(6) #„‰
    OP_DROP(117)
    OP_0(0)
    OP_IF(99)
    OP_DATA_3(3) ord
    OP_DATA_1(1) 
    OP_DATA_23(23) text/html;charset=utf-8
    OP_0(0)
    OP_PUSHDATA2(77) <html lang="en"> <head> <meta charset="UTF-8"> <title>Simple JavaScript Snake Game| Webdevtrick.com</title> <style> canvas { display: block; position: absolute; border: 5px solid #8a2be2; margin: auto; top: 0; bottom: 0; right: 0; left: 0; } </style> </head> <body> <script> var COLS = 26, ROWS = 26, EMPTY = 0, SNAKE = 1, FRUIT = 2, LEFT = 0, UP = 1, RIGHT = 2, DOWN = 3, KEY_LEFT = 37, KEY_UP = 38, KEY_RIGHT = 39, KEY_DOWN = 40, canvas, ctx,
    OP_PUSHDATA2(77) keystate, frames, score; grid = { width: null, height: null, _grid: null, init: function(d, c, r) { this.width = c; this.height = r; this._grid = []; for (var x=0; x < c; x++) { this._grid.push([]); for (var y=0; y < r; y++) { this._grid[x].push(d); } } }, set: function(val, x, y) { this._grid[x][y] = val; }, get: function(x, y) { return this._grid[x][y]; } } snake = { direction: null, last: null, _que
    OP_PUSHDATA2(77) ue: null, init: function(d, x, y) { this.direction = d; this._queue = []; this.insert(x, y); }, insert: function(x, y) { this._queue.unshift({x:x, y:y}); this.last = this._queue[0]; }, remove: function() { return this._queue.pop(); } }; function setFood() { var empty = []; for (var x=0; x < grid.width; x++) { for (var y=0; y < grid.height; y++) { if (grid.get(x, y) === EMPTY) { empty.push({x:x, y:y}); } } } var randpos
    OP_PUSHDATA2(77) = empty[Math.round(Math.random()*(empty.length - 1))]; grid.set(FRUIT, randpos.x, randpos.y); } function main() { canvas = document.createElement("canvas"); canvas.width = COLS*20; canvas.height = ROWS*20; ctx = canvas.getContext("2d"); document.body.appendChild(canvas); ctx.font = "12px Helvetica"; frames = 0; keystate = {}; document.addEventListener("keydown", function(evt) { keystate[evt.keyCode] = true; }); document.addEventListener("keyup", function(evt) {
    OP_PUSHDATA2(77) delete keystate[evt.keyCode]; }); init(); loop(); } function init() { score = 0; grid.init(EMPTY, COLS, ROWS); var sp = {x:Math.floor(COLS/2), y:ROWS-1}; snake.init(UP, sp.x, sp.y); grid.set(SNAKE, sp.x, sp.y); setFood(); } function loop() { update(); draw(); window.requestAnimationFrame(loop, canvas); } function update() { frames++; if (keystate[KEY_LEFT] && snake.direction !== RIGHT) { snake.direction = LEFT; } if (keystate[KEY_UP
    OP_PUSHDATA2(77) ] && snake.direction !== DOWN) { snake.direction = UP; } if (keystate[KEY_RIGHT] && snake.direction !== LEFT) { snake.direction = RIGHT; } if (keystate[KEY_DOWN] && snake.direction !== UP) { snake.direction = DOWN; } if (frames%7 === 0) { var nx = snake.last.x; var ny = snake.last.y; switch (snake.direction) { case LEFT: nx--; break; case UP: ny--; break; case RIGHT: nx++; break; case DOWN: ny++; break; } if (0 > nx || nx > grid.width-1 ||
    OP_PUSHDATA2(77) 0 > ny || ny > grid.height-1 || grid.get(nx, ny) === SNAKE ) { return init(); } if (grid.get(nx, ny) === FRUIT) { score++; setFood(); } else { var tail = snake.remove(); grid.set(EMPTY, tail.x, tail.y); } grid.set(SNAKE, nx, ny); snake.insert(nx, ny); } } function draw() { var tw = canvas.width/grid.width; var th = canvas.height/grid.height; for (var x=0; x < grid.width; x++) { for (var y=0; y < grid.height; y++) { switch (grid.get(x, y)) {
    OP_PUSHDATA2(77) case EMPTY: ctx.fillStyle = "#000"; break; case SNAKE: ctx.fillStyle = "#009BFF"; break; case FRUIT: ctx.fillStyle = "#ff8c00"; break; } ctx.fillRect(x*tw, y*th, tw, th); } } ctx.fillStyle = "#fff"; ctx.fillText("SCORE: " + score, 10, canvas.height-16); } main(); </script> </body> </html>
    OP_ENDIF(104)
31 Outputs
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:0
  • value  546
    address  bc1qx7cqr6qq8nxr4hh3x8j8dzfqmg67kx6mss6e9y
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:1
  • value  7308
    address  bc1p3zc9cyqj04m58zvymxuy8wxz5d0sa7lfznpmgles3fuxenvzge9s6ykf65
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:2
  • value  7296
    address  bc1pnj854hkg9epr5zq9y3qvfjzjrqr9kuwld65fjm25ec6a02urkj7s868rnm
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:3
  • value  7296
    address  bc1pnj854hkg9epr5zq9y3qvfjzjrqr9kuwld65fjm25ec6a02urkj7s868rnm
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:4
  • value  7308
    address  bc1pptfw9sekegvse7vqdvs6eazzqy4lml584wl6fdqpqqqs97ezzgdspuhjjf
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:5
  • value  7308
    address  bc1pptfw9sekegvse7vqdvs6eazzqy4lml584wl6fdqpqqqs97ezzgdspuhjjf
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:6
  • value  7308
    address  bc1pwuhrh0vyc3xjdh34rg9f372q53353a4me5nkqhh0dxmy6km4n5dswphs20
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:7
  • value  7308
    address  bc1pwuhrh0vyc3xjdh34rg9f372q53353a4me5nkqhh0dxmy6km4n5dswphs20
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:8
  • value  7302
    address  bc1pau9prn3svh63lk8qzulazqxhen7k2vmlx7jj7rj3zrg6swz3eg0s6avap0
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:9
  • value  7302
    address  bc1pau9prn3svh63lk8qzulazqxhen7k2vmlx7jj7rj3zrg6swz3eg0s6avap0
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:10
  • value  7296
    address  bc1pdefuztrv7nl97d9srpynfdsy7aexg255j64nfpwrv8ve4a86ceqsvde5lj
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:11
  • value  7296
    address  bc1pdefuztrv7nl97d9srpynfdsy7aexg255j64nfpwrv8ve4a86ceqsvde5lj
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:12
  • value  7296
    address  bc1p0tzp7smufg37d7mfzgtuhx8gd3rcr697g3qyxemtqk65adk4qsjqqnc7d4
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:13
  • value  7296
    address  bc1p0tzp7smufg37d7mfzgtuhx8gd3rcr697g3qyxemtqk65adk4qsjqqnc7d4
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:14
  • value  7296
    address  bc1pn9xne6fwlzqfx9j5z2evkvp3ygq7lcdrf7xvct4uu9d75hx00fkqpd2p27
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:15
  • value  7296
    address  bc1pn9xne6fwlzqfx9j5z2evkvp3ygq7lcdrf7xvct4uu9d75hx00fkqpd2p27
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:16
  • value  7302
    address  bc1p2pdjt6q05dz78d2764v06f0yxdy0ssc7cewa0wwpuhrksgmrsrwqt0z3uy
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:17
  • value  7302
    address  bc1p2pdjt6q05dz78d2764v06f0yxdy0ssc7cewa0wwpuhrksgmrsrwqt0z3uy
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:18
  • value  7302
    address  bc1pg48kun0mg8mte3f3rvxykxekmzg6d0900yxffueuvfdw55kp5e3syu8vvl
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:19
  • value  7302
    address  bc1pg48kun0mg8mte3f3rvxykxekmzg6d0900yxffueuvfdw55kp5e3syu8vvl
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:20
  • value  12900
    address  bc1p5fkjzn550gyfxte736vfthu6f7n5keqkg3uklk526vjs7p84dhvquehdgy
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:21
  • value  12900
    address  bc1p5fkjzn550gyfxte736vfthu6f7n5keqkg3uklk526vjs7p84dhvquehdgy
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:22
  • value  12900
    address  bc1p5fkjzn550gyfxte736vfthu6f7n5keqkg3uklk526vjs7p84dhvquehdgy
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:23
  • value  12900
    address  bc1p5fkjzn550gyfxte736vfthu6f7n5keqkg3uklk526vjs7p84dhvquehdgy
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:24
  • value  12900
    address  bc1p5fkjzn550gyfxte736vfthu6f7n5keqkg3uklk526vjs7p84dhvquehdgy
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:25
  • value  12900
    address  bc1p5fkjzn550gyfxte736vfthu6f7n5keqkg3uklk526vjs7p84dhvquehdgy
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:26
  • value  12900
    address  bc1p5fkjzn550gyfxte736vfthu6f7n5keqkg3uklk526vjs7p84dhvquehdgy
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:27
  • value  12900
    address  bc1p5fkjzn550gyfxte736vfthu6f7n5keqkg3uklk526vjs7p84dhvquehdgy
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:28
  • value  12900
    address  bc1p5fkjzn550gyfxte736vfthu6f7n5keqkg3uklk526vjs7p84dhvquehdgy
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:29
  • value  12900
    address  bc1p5fkjzn550gyfxte736vfthu6f7n5keqkg3uklk526vjs7p84dhvquehdgy
  • 9f5a252cdfe94cfedc1e279815d4998a8951e6599bf2050c60be0e060185a8fa:30
  • value  73304
    address  bc1qc9rvpshxdxdvyn609c6qnx7e43dcgau6r0c9mt