From: Dylan Lloyd Date: Sun, 16 Dec 2012 09:01:13 +0000 (-0500) Subject: whoops, swap height/width X-Git-Url: https://disinclined.org/git/?a=commitdiff_plain;h=14a6e0b1a7490eacec21e3726bb8e6a243da1e91;p=cellular-automaton.git whoops, swap height/width --- diff --git a/2d.js b/2d.js index a42f1eb..cac53ea 100644 --- a/2d.js +++ b/2d.js @@ -44,7 +44,7 @@ $(document).ready(function(){ var x = 0; var y = 0; for (var i = 0; i < cells; i++) { - world.push(new cell(x, y, cellHeight, cellWidth)); + world.push(new cell(x, y, cellWidth, cellHeight)); x += cellWidth; Math.random() > .5 ? world[i].revive() : world[i].kill(); } @@ -58,7 +58,7 @@ $(document).ready(function(){ var s = '0' + world.map(function(c) { return c.state }).join('') + '0'; world = []; for (var i = 0; i < cells; i++) { - world.push(new cell(x, y, cellHeight, cellWidth)); + world.push(new cell(x, y, cellWidth, cellHeight)); x += cellWidth; state[s.substr(i, 3)] == 1 ? world[i].revive() : world[i].kill(); }