Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

b24cd355d27d2b698d85ddffe7e005e897747aa12cc09f2565d51803d1a3d046
Timestamp (utc)
2021-06-07 01:11:22
Fee Paid
0.00003146 BSV
(
0.05997025 BSV
-
0.05993879 BSV
)
Fee Rate
500 sat/KB
Version
1
Confirmations
296,079
Size Stats
6,291 B

7 Outputs

Total Output:
0.05993879 BSV
  • jrunM{"in":0,"ref":["native://Jig","f97d4ac2a3d6f5ed09fad4a4f341619dc5a3773d9844ff95c99c5d4f8388de2f_o1"],"out":["c81c736abdbd2f8242388aef85f74cc5b08c2e32a53b2f0d98cab19abe3878ea","9b330303f08a2845880b4fcafd2e541983f857735136acb3960f5d0b6de295e6","928664149fc2962686e3b1e67b81c13677ca843bcc7d9a154765c66f44f8aacb","e026095bad61f0e497dcc96d19afb1ec287d53806d20cde8655be4b1dc341303","0ebbb606a6d1d526dfe49c185de703e3153ece6e2331ef882583d891abf8521f"],"del":[],"cre":["mtz7dRWbq6wgrtTQvNsCc8cjovv3cNyucF","mtz7dRWbq6wgrtTQvNsCc8cjovv3cNyucF","mtz7dRWbq6wgrtTQvNsCc8cjovv3cNyucF","mtz7dRWbq6wgrtTQvNsCc8cjovv3cNyucF","mtz7dRWbq6wgrtTQvNsCc8cjovv3cNyucF"],"exec":[{"op":"DEPLOY","data":["class InvitationRequest extends Jig {\n sendInvitation() {\n this.player = this.owner;\n this.owner = SERVER_OWNER;\n }\n\n sendJoystick(game) {\n expect(game).toBeInstanceOf(Game);\n const joystick = new Joystick(game, game.getAndSwapNextTeam());\n game.add(joystick);\n joystick.send(this.player);\n return joystick;\n }\n}",{"deps":{"Game":{"$jig":3},"Jig":{"$jig":0},"Joystick":{"$jig":4},"SERVER_OWNER":"mj1WZ8wTimESFzLgio12iG55M5dYR16PwR","expect":{"$jig":1}},"metadata":{"emoji":"📨"}},"class Game extends Jig {\n init() {\n expect(caller).toBe(Game)\n this.reset()\n }\n\n static createGame() {\n const newGame = new Game();\n this.all.push(newGame);\n return newGame;\n }\n\n reset() {\n this.players = [];\n this.joysticks = [];\n this.pawns = [];\n this.nextTeam = 'UP';\n }\n\n begin(gameName, numberOfPlayers) {\n expect(gameName).toBeString();\n expect(numberOfPlayers).toBeNumber();\n this.gameName = gameName;\n this.numberOfPlayers = numberOfPlayers;\n this.status = RUNNING_STATUS;\n this.winner = null;\n this.currentTurn = new Turn();\n }\n\n add(joystick) {\n expect(joystick).toBeInstanceOf(Joystick);\n this.joysticks.push(joystick);\n }\n\n getAndSwapNextTeam() {\n const team = this.nextTeam;\n if (team === 'UP') {\n this.nextTeam = 'DOWN';\n } else {\n this.nextTeam = 'UP';\n }\n return team;\n }\n\n nextTurn() {\n this.currentTurn = new Turn();\n }\n\n tick() {\n if (this.status !== RUNNING_STATUS) {\n return\n }\n this.joysticks.forEach(j => {\n j.commands.filter(command => command.turn === this.currentTurn).forEach(command => {\n this.pawns.push(new Pawn(health, j.team, command.column, command.hero));\n });\n });\n\n const goingUp = this.pawns.filter(p => p.goingUp());\n const goingDown = this.pawns.filter(p => !p.goingUp());\n let engagedOnBattle = [];\n goingUp.forEach(pUp => {\n const enemiesNear = goingDown.filter(pDw => pUp.isNearTo(pDw));\n if (enemiesNear.length > 0) {\n engagedOnBattle = [...engagedOnBattle, ...enemiesNear, pUp]\n }\n })\n this.pawns.forEach(p => p.tick(engagedOnBattle));\n this.pawns = this.pawns.filter(p => p.health > 0);\n\n const champions = this.pawns.filter(p => p.won())\n if (champions.length > 0) {\n const upChampions = champions.filter(p => p.direction === 'UP');\n const downChampions = champions.filter(p => p.direction === 'DOWN');\n\n if (upChampions.length > downChampions.length) {\n this.winner = 'UP'\n this.endGame()\n return\n }\n if (upChampions.length < downChampions.length) {\n this.winner = 'DOWN'\n this.endGame()\n return\n }\n }\n\n this.nextTurn();\n }\n\n endGame() {\n this.status = END_STATUS;\n }\n}",{"all":[],"deps":{"END_STATUS":"END","Jig":{"$dup":["1","deps","Jig"]},"Joystick":{"$dup":["1","deps","Joystick"]},"MAP_LENGTH":20,"Pawn":{"$jig":5},"RUNNING_STATUS":"RUNNING","Turn":{"$jig":6},"expect":{"$dup":["1","deps","expect"]}},"metadata":{"emoji":"👾"}},"class Joystick extends Jig {\n init(game, team) {\n this.commands = [];\n this.game = game;\n this.team = team;\n }\n\n send(player) {\n expect(player).toBeString();\n this.owner = player;\n }\n\n deployHero(hero, column) {\n this.commands.push({hero, column, turn: this.game.currentTurn})\n }\n}",{"deps":{"Jig":{"$dup":["1","deps","Jig"]},"expect":{"$dup":["1","deps","expect"]}},"metadata":{"emoji":"🕹️"}},"class Pawn extends Jig {\n init(health, direction, column, hero) {\n this.direction = direction\n this.position = {x: column, y: this.goingUp() ? MAP_LENGTH : 0}\n this.health = health\n this.originalHero = hero\n }\n\n send(gameOwner) {\n this.owner = gameOwner;\n }\n\n goingUp() {\n return this.direction === \"UP\"\n }\n\n tick(engagedOnBattle) {\n if (!engagedOnBattle.includes(this)) {\n if (this.goingUp()) {\n this.position.y = this.position.y - 1;\n } else {\n this.position.y = this.position.y + 1;\n }\n } else {\n this.health = this.health - 10;\n }\n }\n\n isNearTo(opponent) {\n return this.position.x === opponent.position.x && this._abs(this.position.y - opponent.position.y) <= 1;\n }\n\n _abs(x) {\n expect(x).toBeNumber();\n return (x < 0) ? (-x) : x\n }\n}",{"deps":{"Jig":{"$dup":["1","deps","Jig"]},"MAP_LENGTH":20,"expect":{"$dup":["1","deps","expect"]}},"metadata":{"emoji":"️♟️"}},"class Turn extends Jig {\n}",{"deps":{"Jig":{"$dup":["1","deps","Jig"]}},"metadata":{"emoji":"⌛"}}]}]}
    https://whatsonchain.com/tx/b24cd355d27d2b698d85ddffe7e005e897747aa12cc09f2565d51803d1a3d046
Total Output:
0.05993879 BSV