Esempio n. 1
0
 def canMoveCards(self, cards):
     if not ReserveStack.canMoveCards(self, cards):
         return False
     if not self.game.s.waste.cards:
         return False
     c = self.game.s.waste.cards[-1]
     return c.face_up and cards[0].suit == c.suit and \
         cards[0].rank == c.rank
Esempio n. 2
0
 def canMoveCards(self, cards):
     if not ReserveStack.canMoveCards(self, cards):
         return False
     rows = self.game.s.rows
     index = list(self.game.s.reserves).index(self)
     if rows[2 * index].cards or rows[2 * index + 1].cards:
         return False
     return True
Esempio n. 3
0
 def canMoveCards(self, cards):
     if not ReserveStack.canMoveCards(self, cards):
         return False
     if not self.game.s.waste.cards:
         return False
     c = self.game.s.waste.cards[-1]
     return c.face_up and cards[0].suit == c.suit and \
         cards[0].rank == c.rank
Esempio n. 4
0
 def canMoveCards(self, cards):
     if not ReserveStack.canMoveCards(self, cards):
         return False
     rows = self.game.s.rows
     index = list(self.game.s.reserves).index(self)
     if rows[2*index].cards or rows[2*index+1].cards:
         return False
     return True
Esempio n. 5
0
 def canMoveCards(self, cards):
     if self.game.s.rows[self.id - 2].cards:
         return False
     return ReserveStack.canMoveCards(self, cards)
Esempio n. 6
0
 def canMoveCards(self, cards):
     if self.game.s.rows[8].cards and self.game.s.rows[9].cards:
         return False
     return ReserveStack.canMoveCards(self, cards)
Esempio n. 7
0
 def canMoveCards(self, cards):
     if self.game.s.rows[self.id-2].cards:
         return False
     return ReserveStack.canMoveCards(self, cards)
Esempio n. 8
0
 def canMoveCards(self, cards):
     if self.game.s.rows[8].cards and self.game.s.rows[9].cards:
         return False
     return ReserveStack.canMoveCards(self, cards)