Adaptation of HTML5 Game from Jacob Seidelin's Great book