def acceptsCards(self, from_stack, cards): if cards is None: # special hack for _getDropStack() below return SS_FoundationStack.acceptsCards( self, from_stack, from_stack.cards) # if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False # We only accept cards from a Reserve. Other cards will get # delivered by _handlePairMove. return from_stack in self.game.s.reserves
def acceptsCards(self, from_stack, cards): if cards is None: # special hack for _getDropStack() below return SS_FoundationStack.acceptsCards(self, from_stack, from_stack.cards) # if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False # We only accept cards from a Reserve. Other cards will get # delivered by _handlePairMove. return from_stack in self.game.s.reserves
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if self.cards: # check suit return self.cards[-1].suit == cards[0].suit return True
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if self.cards: # check suit return self.cards[-1].suit == cards[0].suit return True
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if self.cards: # check the color if cards[0].color != self.cards[-1].color: return False return True
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if not self.cards: for s in self.game.s.foundations: if s.cards: return cards[0].rank == s.cards[0].rank return True
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if from_stack in self.game.s.rows: if len(self.game.s.talon.cards) == 0: return True return self.game.num_dealled <= 0 return True
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if from_stack in self.game.s.rows: if len(self.game.s.talon.cards) == 0: return True return self.game.num_dealled <= 0 return True
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 SS_FoundationStack.acceptsCards(self, from_stack, cards)
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if self.cards: # check the color if cards[0].color != self.cards[-1].color: return False return True
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if not self.cards: for s in self.game.s.foundations: if s.cards: return cards[0].rank == s.cards[0].rank return True
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 SS_FoundationStack.acceptsCards(self, from_stack, cards)
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if from_stack in self.game.s.reserves: return True for r in self.game.s.reserves: if not r.cards: return True return False
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False # this stack accepts only a card from a rowstack with an empty # left neighbour if from_stack not in self.game.s.rows: return False if from_stack.id % 10 == 0: return False return len(self.game.s.rows[from_stack.id - 1].cards) == 0
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False # this stack accepts only a card from a rowstack with an empty # left neighbour if from_stack not in self.game.s.rows: return False if from_stack.id % 10 == 0: return False return len(self.game.s.rows[from_stack.id - 1].cards) == 0
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if self.game.s.talon.round == 1: if (self.cap.base_rank == KING and from_stack in self.game.s.rows[6:10:]): return False if (self.cap.base_rank == ACE and from_stack in self.game.s.rows[:4]): return False return True
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if self.game.s.talon.round == 1: if (self.cap.base_rank == KING and from_stack in self.game.s.rows[6:10:]): return False if (self.cap.base_rank == ACE and from_stack in self.game.s.rows[:4]): return False return True
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if not self.cards: return True if self.game.s.talon.cards: if from_stack in self.game.s.rows[4:]: i = list(self.game.s.foundations).index(self) j = list(self.game.s.rows).index(from_stack) return i == j - 4 return True
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if not self.cards: return True if self.game.s.talon.cards: if from_stack in self.game.s.rows[4:]: i = list(self.game.s.foundations).index(self) j = list(self.game.s.rows).index(from_stack) return i == j-4 return True
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return 0 return cards[-1].rank < len(self.game.s.foundations[4].cards)
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False # we only accept cards if there are no cards in the talon return len(self.game.s.talon.cards) == 0
def acceptsCards(self, from_stack, cards): if self.game.getState() == 0: if cards[0].suit != self.cap.base_suit: return False return True return SS_FoundationStack.acceptsCards(self, from_stack, cards)
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if self.game.s.waste.cards or self.game.s.talon.cards: return False return True
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False index = list(self.game.s.foundations).index(self) index %= 8 return len(self.game.s.foundations[index].cards) > 0
def acceptsCards(self, from_stack, cards): if self.game.getState() == 0: if cards[0].suit != self.cap.base_suit: return False return True return SS_FoundationStack.acceptsCards(self, from_stack, cards)
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False index = list(self.game.s.foundations).index(self) index %= 8 return len(self.game.s.foundations[index].cards) > 0
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if from_stack in self.game.s.rows[:8]: return True return False
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return 0 return cards[-1].rank < len(self.game.s.foundations[4].cards)
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False # we only accept cards if there are no cards in the talon return len(self.game.s.talon.cards) == 0
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if self.game.s.waste.cards or self.game.s.talon.cards: return False return True
def acceptsCards(self, from_stack, cards): if not SS_FoundationStack.acceptsCards(self, from_stack, cards): return False if from_stack in self.game.s.rows[:8]: return True return False