HTML5 and JavaScript Simple Game