xxxxxxxxxx
28
class Cat {
constructor(c){
this.x = random(width);
this.y = random(height);
this.w = 50;
this.c = c;
}
body(){
fill(this.c);
ellipse(this.x , this.y +30, this.w +10);
}
face(){
fill(this.c);
ellipse(this.x, this.y, this.w);
}
tail(){
fill(this.c);
rect(this.x + 20, this.y+ 40, this.w, 10);
}
ear(){
triangle(this.x -20, this. y - 35, this.x- 20, this.y -5, this.x + 5, this.y )
triangle(this.x + 20, this. y -35, this.x+ 20, this.y +5, this.x - 5, this.y )
}
}