added a line to check to see if the game is over in between turns