xxxxxxxxxx
22
class Ball {
constructor(x, y) {
this.x = x;
this.y = y;
this.angle = 0;
}
move() {
this.x += 0 + 90 * cos(this.angle);
this.y += 0 + 90 * sin(this.angle);
this.angle += 1;
}
display() {
fill(255);
noStroke();
circle(this.x, this.y, 10);
}
}