Checks if game is over