class walker{ int x,y,sz,xStep,yStep; color myColor; walker(int _x, int _y, int _sz, color _myColor){ x=_x; y=_y; sz=_sz; myColor=_myColor; } void walk(){ xStep = int(random(99)); yStep = int(random(99)); if(xStep >= 50){ x += jump; } else { x -= jump; } if(x<0){ x=0; } else if (x>width){ x=width; } if(yStep >= 50){ y += jump; } else { y -= jump; } if(y<0){ y=0; } else if (y>height){ y=height; } } void render(){ stroke(myColor); //noStroke(); //fill(myColor); //ellipse(x,y,sz,sz); point(x,y); } color getColor(){ return myColor; } int getX(){ return x; } int getY(){ return y; } void setX(int _x){ x=_x; } void setY(int _y){ y = _y; } }