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