tgif/context.py
def score(self):
        """ Score of a friday context.
        """
        def _own_score(card):
            """ Score of owned card.
            """
            return -5 if card.destroy_value == 2 else card.fighting_value
        life_score = self.life * 5
        own_pile_score = sum(_own_score(card) for card in self.piles.own.all_cards)
        pirate_score = len(self.piles.pirate.discarded_cards()) * 5
        return life_score + own_pile_score + pirate_score
 Score of a friday context.
        
Score of a friday context.
Score of a friday context .
def score(self):
        def _own_score(card):
            return -5 if card.destroy_value == 2 else card.fighting_value
        life_score = self.life * 5
        own_pile_score = sum(_own_score(card) for card in self.piles.own.all_cards)
        pirate_score = len(self.piles.pirate.discarded_cards()) * 5
        return life_score + own_pile_score + pirate_score
def score ( self ) : def _own_score ( card ) : """ Score of owned card.
            """ return - 5 if card . destroy_value == 2 else card . fighting_value life_score = self . life * 5 own_pile_score = sum ( _own_score ( card ) for card in self . piles . own . all_cards ) pirate_score = len ( self . piles . pirate . discarded_cards ( ) ) * 5 return life_score + own_pile_score + pirate_score
Score of a friday context.
Score of a friday context .
""" Score of a friday context.
        """ """ Score of owned card.
            """
self