xxxxxxxxxx
20
class smileyFace {
constructor (x, y, size) {
this.x = x;
this.y = y;
this.size = size;
this.eyeY = this.size * 20 / 3;
}
display() {
fill(255, 255, 0);
circle(this.x, this.y, this.size);
fill(0);
arc(this.x, this.y + 20, 40, 20, 0, PI);
this.x = this.x - this.size / 5;
ellipse(this.x, this.y - 15, this.size / 10, this.size / 4);
this.x = this.x + this.size / 5;
ellipse(this.x + this.size / 5, this.y - 15, this.size / 10, this.size / 4);
}
}