remove broken features, there's a branch for that
authorDylan Lloyd <dylan@dylansserver.com>
Sun, 16 Dec 2012 18:21:03 +0000 (13:21 -0500)
committerDylan Lloyd <dylan@dylansserver.com>
Sun, 16 Dec 2012 18:21:03 +0000 (13:21 -0500)
2d.js
index.php

diff --git a/2d.js b/2d.js
index 46ccc75..9460aa7 100644 (file)
--- a/2d.js
+++ b/2d.js
@@ -25,14 +25,6 @@ $(document).ready(function(){
             c.fillRect(this.x, this.y, this.h, this.l);
             this.state = 1;
         }
-        this.redraw = function() {
-            c.fillStyle = this.state == 1 ? "rgb(0,0,0)" : "rgb(255,255,255)";
-            c.fillRect(this.x, this.y, this.h, this.l);
-        }
-        this.highlight = function() {
-            c.fillStyle = "rgb(0,0,100)";
-            c.fillRect(this.x, this.y, this.h, this.l);
-        }
     }
 
     function universe() {
@@ -51,15 +43,6 @@ $(document).ready(function(){
             this.population.push(world);
         }
 
-        this.print = function() {
-            for (var i = 0; i < rows; i++) {
-                var s = '';
-                for (var ii = 0; ii < columns; ii++) {
-                    s += this.population[i][ii];
-                }
-            }
-        }
-
         this.highlight = function() {
             for (var i = 0; i < rows; i++) {
                 for (var ii = 0; ii < columns; ii++) {
@@ -121,14 +104,12 @@ $(document).ready(function(){
     }
 
     var automaton = new universe;
-    var seed = $.extend(true, {}, automaton);
     var tickID = 0;
 
     $('#controls #start-automaton').click(function(e){
         tickID = setInterval(function(){tick(automaton)}, 100);
         $('#controls #start-automaton').hide();
         $('#controls #stop-automaton').show();
-        $('#controls #highlight-seed').show();
     });
 
     $('#controls #stop-automaton').click(function(e){
@@ -137,17 +118,4 @@ $(document).ready(function(){
         $('#controls #start-automaton').show();
     });
 
-    $('#controls #reset-automaton').click(function(e){
-        clearInterval(tickID);
-        $('#controls #stop-automaton').hide();
-        $('#controls #start-automaton').show();
-        automaton = $.extend(true, {}, seed);
-        $('#generation')[0].innerHTML = automaton.generation;
-        automaton.redraw();
-    });
-
-    $('#controls #highlight-seed').click(function(e){
-        seed.highlight();
-    });
-
 });
index 43d4837..b9169d5 100644 (file)
--- a/index.php
+++ b/index.php
@@ -16,8 +16,6 @@
         <br><br>
         <span id='start-automaton' class='control'>Start automaton</span>
         <span id='stop-automaton' class='control'>Stop automaton</span>
-        <span id='reset-automaton' class='control'>Reset automaton</span>
-        <span id='highlight-seed' class='control'>Highlight seed</span>
       </div>
     </div>
     <div id='1d-container'>