HTML5 Game code from Udacity class