fix #1, game loss bug in the endGame logic