X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=1d.js;h=ed76608eeeedb0dfaf65c5a83cdce0755e920721;hb=4aff4ddc2edf85b1eb846c7e126545f1a9e9bd33;hp=cac53ea2afeb8a0544019d86f002bdf40a75e14f;hpb=62b73ae19321e18709f44efd9d290ef0722b04d8;p=cellular-automaton.git diff --git a/1d.js b/1d.js index cac53ea..ed76608 100644 --- a/1d.js +++ b/1d.js @@ -1,7 +1,7 @@ $(document).ready(function(){ - var cells = 20; - var generations = 10; + var cells = 100; + var generations = 100; var state = { '000' : '0', @@ -14,11 +14,11 @@ $(document).ready(function(){ '111' : '0', } - var canvas = document.getElementById('canvas') + var canvas = document.getElementById('1d-automaton') var c = canvas.getContext('2d'); - var cellWidth = Math.floor(canvas.width / cells); - var cellHeight = Math.floor(canvas.height / generations); + var cellWidth = canvas.width / cells; + var cellHeight = canvas.height / generations; var generation = 0; function cell(x, y, h, l) {