From: Dylan Lloyd Date: Mon, 17 Dec 2012 03:20:47 +0000 (-0500) Subject: added reseed function to 2d automaton X-Git-Url: https://disinclined.org/git/?a=commitdiff_plain;h=86b4e9d5307c2232a7e7da94832760a850d7722d;p=cellular-automaton.git added reseed function to 2d automaton --- diff --git a/2d.js b/2d.js index f0e5f1e..8669d2e 100644 --- a/2d.js +++ b/2d.js @@ -124,6 +124,14 @@ $(document).ready(function(){ running = 0; }); + $('#controls #reseed-automaton').click(function(e){ + if (running) clearInterval(tickID); + $('#controls #stop-automaton').hide(); + $('#controls #start-automaton').show(); + running = 0; + automaton = new universe; + }); + $('#2d-automaton').click(function(e) { if (!running) { var x = e.pageX - $('#2d-automaton').offset().left; diff --git a/index.php b/index.php index 06878e3..d8cd22d 100644 --- a/index.php +++ b/index.php @@ -17,6 +17,7 @@

Start automaton Stop automaton + Reseed automaton