Hello, I am trying to make a class with just a simple circle. I am planning to eventually have more circles too, but I think that I am running into a syntax/logic error. Any help would be greatly appreciated.
bubble b1;
void setup(){
size(300,400);
b1 = new bubble(10,30,10,10);
}
void draw(){
background(255);
b1.display();
}
class bubble{
float x;
float y;
float dx;
float dy;
bubble(float x, float y, float dx, float dy){
this.x=x;
this.y=y;
this.dx=dx;
this.dy=dy;
}
}
void display(){
fill(0);
ellipse(random(0,width-30),height-30, 30,30);
}