Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

1cddc99f1343ff4c6382d178ce62fbdc308fd6deb3c652c95fc7cfccfdf0ed3d
Timestamp (utc)
2020-12-25 18:48:50
Fee Paid
0.00001693 BSV
(
0.08513769 BSV
-
0.08512076 BSV
)
Fee Rate
500.1 sat/KB
Version
1
Confirmations
325,086
Size Stats
3,385 B

2 Outputs

Total Output:
0.08512076 BSV
  • Q!·ÆúUXü;¿ƒœZ¬‘ƒE°ØéR™ßNvnà¢%CQ®ME {"__cls":"class GOL {\r\n constructor(n) {\r\n this.n = n\r\n this.gridHeight = n\r\n this.gridWidth = n\r\n var gridHeight = this.n\r\n var gridWidth = this.n\r\n var theGrid = this.createArray(gridWidth)\r\n var mirrorGrid = theGrid\r\n }\r\n \r\n \r\n createArray(rows) {\r\n var arr = [];\r\n for (var i = 0; i < rows; i++) {\r\n var rawRandom = Math.random();\r\n var improvedNum = (rawRandom * 2);\r\n var randomBinary = Math.floor(improvedNum);\r\n if (randomBinary === 1) {\r\n arr[i] = [1];\r\n } else {\r\n arr[i] = [0];\r\n }\r\n }\r\n return arr;\r\n }\r\n updateGrid() {\r\n let j = 1\r\n let k = 1\r\n let gh = GOL.gridHeight\r\n let gw = GOL.gridWidth\r\n let tC = 0\r\n let tC1 = 0\r\n let j0 = 0\r\n let k0 = 0\r\n let j1 = 0\r\n let k1 = 0\r\n let grid = GOL.theGrid\r\n console.log(grid[j][k])\r\n for (j; j < gh; j++) { //iterate through rows\r\n for (k; k < gw; k++) { //iterate through columns\r\n j0 = j - 1\r\n k0 = k - 1\r\n j1 = j + 1\r\n k1 = k + 1\r\n tC = 0\r\n tC1 = 0\r\n console.log(j,k,k0,k1,j0,j1)\r\n //add up the total values for the surrounding cells\r\n tC1 += grid[j-1][k-1]; //top left\r\n console.log(grid[1][1])\r\n console.log(grid[j][k])\r\n tC1 += grid[j-1][k]; //top center\r\n tC1 += grid[j-1][k+1]; //top right\r\n tC1 += grid[j][k-1]; //middle left\r\n tC1 += grid[j][k+1]; //middle right\r\n tC1 += grid[j+1][k-10]; //bottom left \r\n tC1 += grid[j+1][k]; //bottom center \r\n tC1 += grid[j+1][k+1]; //bottom right\r\n console.log(j,k,k0,k1,j0,j1,tC1,tC)\r\n //apply the rules to each cell\r\n if (this.theGrid[j][k] == [0]) {\r\n switch (tC) {\r\n case 3:\r\n this.mirrorGrid[j][k] = [1]; //if cell is dead and has 3 neighbours, switch it on\r\n break;\r\n default:\r\n this.mirrorGrid[j][k] = [0]; //otherwise leave it dead\r\n }\r\n } else if (this.theGrid[j][k] == [1]) { //apply rules to living cell\r\n switch (tC) {\r\n case 0:\r\n case 1:\r\n this.mirrorGrid[j][k] = [0]; //die of lonelines\r\n break;\r\n case 2:\r\n case 3:\r\n this.mirrorGrid[j][k] = [1]; //carry on living\r\n break;\r\n case 4:\r\n case 5:\r\n case 6:\r\n case 7:\r\n case 8:\r\n this.mirrorGrid[j][k] = [0]; //die of overcrowding\r\n break;\r\n default:\r\n this.mirrorGrid[j][k] = [0]; //\r\n }\r\n }\r\n }\r\n }\r\n //copy mirrorGrid to theGrid\r\n j = 0\r\n k = 0\r\n for (j; j < this.gridHeight; j++) { \r\n for (k; k < this.gridWidth; k++) {\r\n this.theGrid[j][k] = this.mirrorGrid[j][k];\r\n }\r\n }\r\n \r\n }\r\n}","__index":{"obj":0},"__func":"constructor","__args":[9]}u
    https://whatsonchain.com/tx/1cddc99f1343ff4c6382d178ce62fbdc308fd6deb3c652c95fc7cfccfdf0ed3d