Processing+-+Animation+Example

Hey, here's an example of a car, used from Khan Academy's Intro to Animation example: code format="java" //This program is heavily (heavily) based on Khan Academy's //Intro to Animation tutorial: //http://www.khanacademy.org/cs/intro-to-animation/830742281

void setup { size(400, 400); noStroke; }

void draw {

// draw the car body fill(255, 0, 115); rect(0, 200, 100, 20); rect(15, 178, 70, 40);

// draw the wheels fill(77, 66, 66); ellipse(25, 221, 24, 24); ellipse(75, 221, 24, 24); } code Can you add a variable to make the car drive?

Hint: You may want to redraw the background at the beginning of the draw loop.