Beispiel #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
Beispiel #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
Beispiel #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
Beispiel #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
Beispiel #5
0
 def canMoveCards(self, cards):
     if self.game.s.rows[self.id - 2].cards:
         return False
     return ReserveStack.canMoveCards(self, cards)
Beispiel #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)
Beispiel #7
0
 def canMoveCards(self, cards):
     if self.game.s.rows[self.id-2].cards:
         return False
     return ReserveStack.canMoveCards(self, cards)
Beispiel #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)