Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

bf191f23d53b95f2efe332fa62aff064a7ae72399d19ca46a546bb2b1ff3f29e
Timestamp (utc)
2021-06-06 23:44:18
Fee Paid
0.00003264 BSV
(
0.01907123 BSV
-
0.01903859 BSV
)
Fee Rate
500.2 sat/KB
Version
1
Confirmations
296,071
Size Stats
6,525 B

7 Outputs

Total Output:
0.01903859 BSV
  • jrunMý{"in":0,"ref":["native://Jig","f97d4ac2a3d6f5ed09fad4a4f341619dc5a3773d9844ff95c99c5d4f8388de2f_o1"],"out":["4f00f3b105448dcf1be0f46a78ce146731b6900c9b16b29f018638c00dfa9ec7","93e72c4c4fd739e3b628d1ee57b10fa92f1a6b8f1c7290ae9f842bbde4813390","3d3b147ad0acaef4688685f3324eceb60a8fc80b6bdfc7095e0e908858c9e936","9bc7f445f6701054284ee7e270ce5e0c30846211a9c09551652c4bfad1462c4f","ec9ec2ccf5feb5bb2916c454d179375957c8411940efc03f5f763b94b8e20c8b"],"del":[],"cre":["mj1WZ8wTimESFzLgio12iG55M5dYR16PwR","mj1WZ8wTimESFzLgio12iG55M5dYR16PwR","mj1WZ8wTimESFzLgio12iG55M5dYR16PwR","mj1WZ8wTimESFzLgio12iG55M5dYR16PwR","mj1WZ8wTimESFzLgio12iG55M5dYR16PwR"],"exec":[{"op":"DEPLOY","data":["class InvitationRequest extends Jig {\n init(player, game) {\n this.player = player;\n this.owner = SERVER_OWNER;\n this.game = game;\n }\n\n sendJoystick() {\n const joystick = new Joystick(this.game, this.game.getAndSwapNextTeam());\n this.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 removeFinishedGames() {\n this.all = this.all.filter(g => g.isFinished())\n }\n\n static removeAllGames() {\n this.all = [];\n }\n\n static createGame() {\n const newGame = new Game();\n this.all.push(newGame);\n return newGame;\n }\n\n isFinished() {\n return this.status !== RUNNING_STATUS;\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/bf191f23d53b95f2efe332fa62aff064a7ae72399d19ca46a546bb2b1ff3f29e
Total Output:
0.01903859 BSV