//Declare all global variables int x = 100; int y = 100; int w = 60; int h = 60; int eyeSize = 5; int speed = 5; void setup() { size(200,200); smooth(); framerate(40); } void draw() { // Change the x location of Zoog by speed y = y + speed; if ((y > width) || (y < 0)) { speed = speed * -1; } x = x + speed; if ((x > width) || (x < 0)) { speed = speed * -1; } background(255,0,150); ellipseMode(CENTER); rectMode(CENTER); noStroke(); fill(150); rect(x,y,w/6,h*2); fill(255); ellipse(x,y-h/2,w,h); fill(0); ellipse(x-w/3,y-h/2,eyeSize,eyeSize*2); ellipse(x+w/3,y-h/2,eyeSize,eyeSize*2); stroke(150); line(x-w/12,y+h,x-w/4,y+h+10); line(x+w/12,y+h,x+w/4,y+h+10); }