예제 #1
0
 def canMoveCards(self, cards):
     self_index, self_row = self._getStackIndex(self)
     if self_row in (0, 1):
         below_stack = self.game.s.rows[self_index + 12]
         if below_stack.cards:
             return False
     return SS_RowStack.canMoveCards(self, cards)
예제 #2
0
 def canMoveCards(self, cards):
     self_index, self_row = self._getStackIndex(self)
     if self_row in (0, 1):
         below_stack = self.game.s.rows[self_index+12]
         if below_stack.cards:
             return False
     return SS_RowStack.canMoveCards(self, cards)
예제 #3
0
파일: camelot.py 프로젝트: jimsize/PySolFC
 def canMoveCards(self, cards):
     if not SS_RowStack.canMoveCards(self, cards):
         return False
     # don't work in demo-mode with cloned stack
     # index = list(self.game.s.rows).index(self)
     index = self.id
     col = index % 4
     row = index // 4
     if index < 16:  # left
         for i in range(col+1, 4):
             r = self.game.s.rows[row*4+i]
             if r.cards:
                 return False
     else:  # right
         for i in range(0, col):
             r = self.game.s.rows[row*4+i]
             if r.cards:
                 return False
     return True
예제 #4
0
 def canMoveCards(self, cards):
     if not SS_RowStack.canMoveCards(self, cards):
         return False
     # don't work in demo-mode with cloned stack
     # index = list(self.game.s.rows).index(self)
     index = self.id
     col = index % 4
     row = index // 4
     if index < 16:  # left
         for i in range(col+1, 4):
             r = self.game.s.rows[row*4+i]
             if r.cards:
                 return False
     else:  # right
         for i in range(0, col):
             r = self.game.s.rows[row*4+i]
             if r.cards:
                 return False
     return True