Ball e1;
Ball e2;

void setup() {
  size( 700, 500 );
  e1= new Ball(200,300,30,color(0));
  e2=new Ball(200,350,30, color(100));
  
}

void draw(){
  background(200,0,100);
  e1.display();
  e1.move();

  e2.display();
  e2.move();
}
class Ball{
  
  float x;
  float y;
  float color;
  float tempD;
  Ball(){
    x=width/2;
    y=height/2;
    color=tempD;
    
  }
  void move(){
    y=y+random(-2,2);
    x=x+random(-2,2);
  }
 
  void display(){
    stroke(0);
    fill(color);
    ellipse(x,y,30,30);
  }

}