Alyssa Seosankar – Prof. Higgins – HW 2.2 Part 2 & Part 3 – Due 02/13/13

//Alyssa Seosankar – Prof. Higgins – HW 2.2 Part 2 & Part 3 – Due 02/13/13

int eyeoutline = 4;
int colorB = 0;
int head = 200;

void setup(){
//Setting the window size
size(500, 400);
}
void draw() {
//Setting background color
background(colorB);
//Drawing head of creeper
fill(colorB);
stroke(249, 255, 9);
random(8);
strokeWeight(8);
head = constrain(head, 200, 230);
head = head + 1;
ellipse(390, mouseY, head, head);
//Drawing left eye of creeper
fill(255, 255, 255);
stroke(255, 9, 9);
strokeWeight(eyeoutline);
ellipse(350, mouseY, 40, 40);
noFill();
noStroke();
fill(0);
ellipse(360, mouseY, 20, 20);
//Drawing right eye of creeper
fill(255, 255, 255);
stroke(255, 9, 9);
strokeWeight(eyeoutline);
ellipse(440, mouseY, 40, 40);
noFill();
noStroke();
fill(0);
ellipse(450, mouseY, 20, 20);
}

void mousePressed() {
if (colorB == 0) {
colorB = 255;
} else {
colorB = 0;
}
}

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *