mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Refactor.
This commit is contained in:
parent
53bc1fb8eb
commit
af47abefbb
1 changed files with 4 additions and 8 deletions
|
@ -2823,28 +2823,24 @@ class SuperMoveRK_RowStack(SuperMoveStack_StackMethods, RK_RowStack):
|
|||
def canMoveCards(self, cards):
|
||||
if not RK_RowStack.canMoveCards(self, cards):
|
||||
return False
|
||||
max_move = self._getMaxMove(1)
|
||||
return len(cards) <= max_move
|
||||
return len(cards) <= self._getMaxMove(1)
|
||||
|
||||
def acceptsCards(self, from_stack, cards):
|
||||
if not RK_RowStack.acceptsCards(self, from_stack, cards):
|
||||
return False
|
||||
max_move = self._getMaxMove(len(self.cards))
|
||||
return len(cards) <= max_move
|
||||
return len(cards) <= self._getMaxMove(len(self.cards))
|
||||
|
||||
|
||||
class SuperMoveSC_RowStack(SuperMoveStack_StackMethods, SC_RowStack):
|
||||
def canMoveCards(self, cards):
|
||||
if not SC_RowStack.canMoveCards(self, cards):
|
||||
return False
|
||||
max_move = self._getMaxMove(1)
|
||||
return len(cards) <= max_move
|
||||
return len(cards) <= self._getMaxMove(1)
|
||||
|
||||
def acceptsCards(self, from_stack, cards):
|
||||
if not SC_RowStack.acceptsCards(self, from_stack, cards):
|
||||
return False
|
||||
max_move = self._getMaxMove(len(self.cards))
|
||||
return len(cards) <= max_move
|
||||
return len(cards) <= self._getMaxMove(len(self.cards))
|
||||
|
||||
|
||||
class SuperMoveBO_RowStack(SuperMoveStack_StackMethods, BO_RowStack):
|
||||
|
|
Loading…
Add table
Reference in a new issue