changed isGameOver to hasOpenSpaces