class agent{ PVector vel; PVector pos; PVector targ; float mx,my; agent(int x, int y){ vel= new PVector(random(100),random(100)); targ= new PVector(0,0); pos = new PVector(x,y); } void render(){ ellipse(pos.x,pos.y,10,10); } void update(){ pos.add(vel); } void vChange(PVector ch){ vel.set(ch); } void edge(){ if (pos.x > width) pos.x = 0; if (pos.x < 0) pos.x = width; if (pos.y > height) pos.y = 0; if (pos.y < 0) pos.y = height; } }