def acceptsCards(self, from_stack, cards): if not ReserveStack.acceptsCards(self, from_stack, cards): return False if from_stack not in self.game.s.rows: return False if self.game.draw_done or not from_stack._canDrawCard(): return False return True
def acceptsCards(self, from_stack, cards): if not ReserveStack.acceptsCards(self, from_stack, cards): return False # must be neighbours if not self.game.isNeighbour(from_stack, self): return False # must be able to move our card to the foundations or reserves return self._getDropStack() is not None
def acceptsCards(self, from_stack, cards): if not ReserveStack.acceptsCards(self, from_stack, cards): return False c = cards[0] if c.rank not in self.ACCEPTED_CARDS: return False for s in self.game.s.reserves: if s.cards and s.cards[0].rank == c.rank: return False return True
def acceptsCards(self, from_stack, cards): if not ReserveStack.acceptsCards(self, from_stack, cards): return False r_ranks = [] for r in self.game.s.reserves: if r.cards: r_ranks.append(r.cards[0].rank) if not r_ranks: return True r_ranks.append(cards[0].rank) r_ranks.sort() if len(r_ranks) == 2: return r_ranks[1]-r_ranks[0] in (1, 12) for i in range(3): j, k = (i+1) % 3, (i+2) % 3 if ((r_ranks[i]+1) % 13 == r_ranks[j] and (r_ranks[j]+1) % 13 == r_ranks[k]): return True return False
def acceptsCards(self, from_stack, cards): # if from_stack.id >= 8: # # from_stack must be a Napoleon_RowStack # return False return ReserveStack.acceptsCards(self, from_stack, cards)
def acceptsCards(self, from_stack, cards): if from_stack is self.game.s.braid or from_stack in self.game.s.rows: return 0 return ReserveStack.acceptsCards(self, from_stack, cards)
def acceptsCards(self, from_stack, cards): if not ReserveStack.acceptsCards(self, from_stack, cards): return 0 # Only take Wizards return cards[0].suit == 4
def acceptsCards(self, from_stack, cards): if not ReserveStack.acceptsCards(self, from_stack, cards): return False return from_stack is self.game.s.talon
def acceptsCards(self, from_stack, cards): if not ReserveStack.acceptsCards(self, from_stack, cards): return 0 return self._getMiddleStack(from_stack) is not None
def acceptsCards(self, from_stack, cards): if not ReserveStack.acceptsCards(self, from_stack, cards): return False if from_stack in self.game.s.rows: return False return True
def acceptsCards(self, from_stack, cards): if (from_stack is self.game.s.braidstrong or from_stack is self.game.s.braidweak or from_stack in self.game.s.rows): return 0 return ReserveStack.acceptsCards(self, from_stack, cards)
def acceptsCards(self, from_stack, cards): return (ReserveStack.acceptsCards(self, from_stack, cards) and self.game.s.talon.cards)
def acceptsCards(self, from_stack, cards): if not ReserveStack.acceptsCards(self, from_stack, cards): return False # must be neighbours return self.game.isNeighbour(from_stack, self)
def acceptsCards(self, from_stack, cards): if from_stack is self.game.s.braid or from_stack in self.game.s.rows: return False return ReserveStack.acceptsCards(self, from_stack, cards)
def acceptsCards(self, from_stack, cards): if not ReserveStack.acceptsCards(self, from_stack, cards): return False return len(self.cards) == 0
def acceptsCards(self, from_stack, cards): if not ReserveStack.acceptsCards(self, from_stack, cards): return False # this stack accepts one card from the Waste pile return from_stack is self.game.s.waste