Ejemplo n.º 1
0
 def acceptsCards(self, from_stack, cards):
     if not AC_FoundationStack.acceptsCards(self, from_stack, cards):
         return False
     if from_stack is self.game.s.waste or \
             from_stack in self.game.s.reserves:
         return False
     return True
Ejemplo n.º 2
0
 def acceptsCards(self, from_stack, cards):
     if not AC_FoundationStack.acceptsCards(self, from_stack, cards):
         return False
     if from_stack is self.game.s.waste or \
             from_stack in self.game.s.reserves:
         return False
     return True
Ejemplo n.º 3
0
 def acceptsCards(self, from_stack, cards):
     if self.game.getState() == 0:
         if len(cards) != 1 or not cards[0].face_up:
             return False
         if cards[0].suit != self.cap.base_suit:
             return False
         return from_stack in self.game.s.rows
     return AC_FoundationStack.acceptsCards(self, from_stack, cards)
Ejemplo n.º 4
0
 def acceptsCards(self, from_stack, cards):
     if self.game.getState() == 0:
         if len(cards) != 1 or not cards[0].face_up:
             return False
         if cards[0].suit != self.cap.base_suit:
             return False
         return from_stack in self.game.s.rows
     return AC_FoundationStack.acceptsCards(self, from_stack, cards)
Ejemplo n.º 5
0
    def acceptsCards(self, from_stack, cards):
        num_cards = len(self.cards)
        for i in range(13):
            check_seq = self.game.s.rows[i].cards
            if len(check_seq) > num_cards:
                if check_seq[num_cards].suit != cards[0].suit:
                    return False

        return AC_FoundationStack.acceptsCards(self, from_stack, cards)
Ejemplo n.º 6
0
 def acceptsCards(self, from_stack, cards):
     if self.cards and not self.game.inSuitSequence(self.cards[-1],
                                                    cards[0]):
         return False
     return AC_FoundationStack.acceptsCards(self, from_stack, cards)