Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

57084b045bd480043b5d2d30f5668840f981b66c12b94a40ca2200db55fb601c
Timestamp (utc)
2021-06-07 08:29:52
Fee Paid
0.00003387 BSV
(
0.01951808 BSV
-
0.01948421 BSV
)
Fee Rate
500 sat/KB
Version
1
Confirmations
302,263
Size Stats
6,772 B

7 Outputs

Total Output:
0.01948421 BSV
  • jrunMó{"in":0,"ref":["native://Jig","f97d4ac2a3d6f5ed09fad4a4f341619dc5a3773d9844ff95c99c5d4f8388de2f_o1"],"out":["d1a3c599bd90996cdd2fa81e5e96916a9e1557c2974b81b9837073545b04b4cd","06097ee7ce73f060b48ab024e64639a9da05a38070a9165dfa52e3667f5a51fe","6b247af3bed25864dbe71aad6bd89a82f2fd0f95bb94793f60d19fb313661c25","8d38ec475c3b16ea3779b2e30e6bd5497344f78de4e9dc7cfde7a7b47a7ee321","14f4325e8592d064118001a0526834c3781d7718f228bace4165cdacc85825d0"],"del":[],"cre":["muGntYX978iFegDyUcRqLpKs4YwehwkFVj","muGntYX978iFegDyUcRqLpKs4YwehwkFVj","muGntYX978iFegDyUcRqLpKs4YwehwkFVj","muGntYX978iFegDyUcRqLpKs4YwehwkFVj","muGntYX978iFegDyUcRqLpKs4YwehwkFVj"],"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 this.used = false;\n }\n\n sendJoystick() {\n if (!this.used) {\n const joystick = new Joystick(this.game, this.game.getAndSwapNextTeam());\n this.game.add(joystick);\n joystick.send(this.player);\n this.used = true;\n return joystick;\n }\n }\n}",{"deps":{"Game":{"$jig":3},"Jig":{"$jig":0},"Joystick":{"$jig":4},"SERVER_OWNER":"muGntYX978iFegDyUcRqLpKs4YwehwkFVj","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(100, 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 won() {\n return (this.goingUp() && this.position.y === 0) || (!this.goingUp() && this.position.y === MAP_LENGTH);\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/57084b045bd480043b5d2d30f5668840f981b66c12b94a40ca2200db55fb601c
Total Output:
0.01948421 BSV