// A class describing what a Wonderer is, including what he can do class Wanderer { float x, y; // the position of the Wanderer float r; // the radius of the wonderer color c; // the color of the wonderer // Initialize a Wanderer to be at the given coordinates Wanderer(float x0, float y0, float r0, color c0) { x = x0; y = y0; r = r0; c = c0; } // Draw a Wanderer, wherever it happens to be now void draw() { fill(c); stroke(red(c)/2,green(c)/2,blue(c)/2); ellipse(x,y,r*2,r*2); } // Update the state of a Wanderer void update() { x+=random(-r,r); y+=random(-r,r); } }