def valid_replay(info, ping, replay, replay_list):
    """Make sure the replay isn't corrupt, and is worth looking at."""
    if info.HasField("error"):
        print((" Replay has error field ").center(107, "="))
        return False
    if (info.base_build != ping.base_build or  # different game version
        info.game_duration_loops < 1000 or
        len(info.player_info) != 2):
    # Probably corrupt, or just not interesting.
        return False
    if replay[0:20] in replay_list:
        print((" Replay has been processed ").center(107, "="))
        return False
    return True