Problem Set 1

Download the starter code from There is a directory starter_code. Copy this directory to a directory with your name. You will always operate on this copy. Inside you will find a run.html file and an exercise.js file as well as 4 images of PacMan. The run.html loads the exercise.js JavaScript code and runs it. You need to complete the code in exercise.js so that the PacMan eats his way across the page. When he comes to a wall at 800 pixels he needs to flip direction and chomp his way back to the left hand wall at zero. He needs to flip direction again. We showed you in class how to debug and test your code.

The image below show what the PacMan looks like.