Fix bug in GameEngine with mishandling of end game condition.