Example #1
0

def check_hh_tie(score):
    """
    For the computer-human and human-human programs, this needs to be
    different.  This is why it's a silly function.
    """
    return score.even == score.odd


if __name__ == "__main__":
    flags = create_parser()
    questions, buzzes = load_data(flags)
    print("Done loading data")

    clear_screen()
    buzzer_check(flags.players)

    score = question_loop(flags, questions, buzzes, present_question_hh, check_hh_tie)

    show_score(score.human, score.computer, "HUMAN", "COMPUTER")

    show_score(
        score.even,
        score.odd,
        "TEAM A",
        "TEAM B",
        left_color="RED",
        right_color="YELLOW",
    )
Example #2
0
    return(Score(even_delta, odd_delta, human_delta, computer_delta))

def check_hh_tie(score):
    """
    For the computer-human and human-human programs, this needs to be
    different.  This is why it's a silly function.
    """
    return score.even == score.odd


if __name__ == "__main__":
    flags = create_parser()
    questions, buzzes = load_data(flags)
    print("Done loading data")

    clear_screen()
    buzzer_check(flags.players)

    score = question_loop(flags, questions, buzzes, present_question_hh,
                          check_hh_tie)

    show_score(score.human, score.computer,
               "HUMAN", "COMPUTER")

    show_score(score.even,
               score.odd,
               "TEAM A", "TEAM B",
               left_color="RED",
               right_color="YELLOW")