X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=2d.js;h=8669d2e05d1d14e399b0e365dce42fb844241695;hb=86b4e9d5307c2232a7e7da94832760a850d7722d;hp=f0e5f1e3ab318cb0106b529029b3d273ebf40e0f;hpb=eb70a4861e1e34d2b30b5e589cc5d4a07c0a18c9;p=cellular-automaton.git 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;