Added AJAX functionality to the game.