def __init__(self, card_list, vp=0, prestige=0): #self.bonus_points_per_card = collections.defaultdict(int) self.bonus_points_per_6_dev = collections.defaultdict(int) self.card_list = card_list self.vp = vp self.prestige = prestige self.total_points = self.vp for card in card_list: if DeckInfo.Is6Dev(card): bonus_for_6 = self.ScoreFor6Dev(card) self.bonus_points_per_6_dev[card] += bonus_for_6 self.total_points += bonus_for_6 self.total_points += DeckInfo.Value(card)
def PointsPerCard(self, card): ret = DeckInfo.Value(card) for other_card in self.card_list: if DeckInfo.Is6Dev(other_card) and other_card != card: ret += GetScoreFunc(other_card)(card) return ret + self.BonusPer6Dev(card)