Two Questions ! Can Someone Please Examine My Code See Where I Went Wrong ???
in
Programming Questions
•
1 year ago
Just wondering how can I simplify my code to reduce the amount of lines ??
void setup()
{
background(0,150,255);
size(600,400);
rect(width/2,height/2,5,100);//cow tail
fill(98,23,22);//brown
rect(width/2+50,height/2+40,20,100);//front left leg
fill(255);//white
rect(width/2+60,height/2+50,20,100);//back left leg
fill(98,23,22);//brown
rect(width/2-50,height/2+40,20,100);//front right leg
fill(255);//white
rect(width/2-60,height/2+50,20,100);//back right leg
fill(98,23,22);//brown
ellipse(width/2,height/2,250,150);//cow body
fill(255);//white
ellipse(width/2,height/2,100,75);//cow head
fill(98,23,22);//brown
ellipse(width/2-20,height/2,10,7);//cow right eye
fill(255);//white
ellipse(width/2+20,height/2,10,7);//cow left eye
fill(98,23,22);//brown
ellipse(width/2,height/2+10,17,7);//cow nose
}
void draw()
{
}
1