CA example quick fix

This commit is contained in:
Daniel Shiffman
2014-02-24 18:47:01 -05:00
parent 5787f66fed
commit 9ca18342cc
2 changed files with 2 additions and 10 deletions

View File

@@ -13,13 +13,6 @@ class CA {
restart();
}
CA() {
scl = 1;
cells = new int[width/scl];
randomize();
restart();
}
// Set the rules of the CA
void setRules(int[] r) {
rules = r;

View File

@@ -10,11 +10,10 @@
CA ca; // An instance object to describe the Wolfram basic Cellular Automata
void setup() {
size(640, 360, P2D);
frameRate(30);
background(0);
size(640, 360);
int[] ruleset = {0,1,0,1,1,0,1,0}; // An initial rule system
ca = new CA(ruleset); // Initialize CA
background(0);
}
void draw() {