def _calculate_scores(p1, p2, game):
    """Calculates the scores for two players based their history.

    Parameters
    ----------
    p1: Player
        The first player.
    p2: Player
        The second player.
    game: Game
        Game object used to score rounds in the players' histories.

    Returns
    -------
    int, int
        The scores for the two input players.
    """
    s1, s2 = 0, 0
    for pair in zip(p1.history, p2.history):
        score = game.score(pair)
        s1 += score[0]
        s2 += score[1]
    return s1, s2
