Udacity HTML5 Canvas - lesson 1 exercise