def four_of_a_kind(dice):
    """
    Score the dice based on rules for FOUR_OF_A_KIND
    """
    points = 0
    dice.sort()
    middle_value = dice[2]
    die_count = 0
    if dice.count(middle_value) >= 4:
        for die in dice:
            if die == middle_value and die_count < 4:
                points += die
                die_count += 1

    return points