In the index.html
file lives a friendly captive .gif known only as The Walker. At present, The Walker only knows how to walk in place, but he has hired us to imbue him with more dynamic behavior. His specifications are below.
- By default, The Walker would like to start at the right border and walk left.
- When The Walker crosses the threshold of either border, he would like to turn around.
Try starting from the "walking_right" branch. The walker is already walking across the screen, you just have to make him start from the right and walk left.
- First, ensure your changes are committed (or discarded). You should have a "clean"
git status
.
- Within the "the_walker" dir, enter this command:
This will change the files in your working directory to match the "walking_right" branch (or snapshot) in git.
git checkout walking_right
- Make the walker start from the right and walk left (subtract from his position, rather than add to it).
- When clicked, The Walker would like to change direction.
- When the left arrow key is pressed, the walker would like to go left. Same goes for the right arrow.
- Debug mode: display walker speed, direction and two other relevant properties of your choice on the screen.
Once completed, compare your solution to the one we did.