From 86b4e9d5307c2232a7e7da94832760a850d7722d Mon Sep 17 00:00:00 2001 From: Dylan Lloyd Date: Sun, 16 Dec 2012 22:20:47 -0500 Subject: [PATCH] added reseed function to 2d automaton --- 2d.js | 8 ++++++++ index.php | 1 + 2 files changed, 9 insertions(+) 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
-- 2.30.2