X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=2d.js;h=cac53ea2afeb8a0544019d86f002bdf40a75e14f;hb=14a6e0b1a7490eacec21e3726bb8e6a243da1e91;hp=a42f1eb2eb8cdfaefe1846cb61d27dcbf6c56eb0;hpb=dffe6fd64e57b88a30725c8b197d29d75c7534c9;p=cellular-automaton.git 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(); }