mirror of
https://github.com/processing/processing4.git
synced 2026-04-18 10:19:18 +02:00
CA example quick fix
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user