added universe toggle logic
[cellular-automaton.git] / 2d.js
diff --git a/2d.js b/2d.js
index 4dd3835..c3a4bbe 100644 (file)
--- a/2d.js
+++ b/2d.js
@@ -63,6 +63,7 @@ $(document).ready(function(){
         }
 
         this.toggle = function() {
+            this.running ? this.stop() : this.start();
         }
 
         this.redraw = function() {