diff --git a/pysollib/games/spider.py b/pysollib/games/spider.py index 3e107906..ebe56ec8 100644 --- a/pysollib/games/spider.py +++ b/pysollib/games/spider.py @@ -326,6 +326,7 @@ class Rachel(pysollib.game.StartDealRowAndCards, RelaxedSpider): class Scorpion_RowStack(Yukon_SS_RowStack, Spider_RowStack): canDropCards = Spider_RowStack.canDropCards + canMoveCards = OpenStack.canMoveCards class Scorpion(RelaxedSpider): diff --git a/pysollib/stack.py b/pysollib/stack.py index 53a84cbf..396f6234 100644 --- a/pysollib/stack.py +++ b/pysollib/stack.py @@ -2473,7 +2473,7 @@ class BasicRowStack(OpenStack): # Abstract class. class SequenceRowStack(SequenceStack_StackMethods, BasicRowStack): - canMoveCards = OpenStack.canMoveCards + # canMoveCards = OpenStack.canMoveCards def __init__(self, x, y, game, **cap): kwdefault(cap, max_move=999999, max_accept=999999) diff --git a/tests/lib/pysol_tests/scorpion_canMove.py b/tests/lib/pysol_tests/scorpion_canMove.py index bfb2057c..aa93936b 100644 --- a/tests/lib/pysol_tests/scorpion_canMove.py +++ b/tests/lib/pysol_tests/scorpion_canMove.py @@ -6,7 +6,7 @@ from pysol_tests.common_mocks1 import MockApp, MockCanvas, MockItem, MockTalon import pysollib.stack from pysollib.acard import AbstractCard -from pysollib.games.spider import Scorpion_RowStack +from pysollib.games.spider import Scorpion_RowStack, Spider_RowStack class MockGame: @@ -60,3 +60,18 @@ class MyTests(unittest.TestCase): stack = self._calc_Scorpion_stack() self.assertTrue(stack.canMoveCards(stack.cards[4:])) self.assertTrue(stack) + + def _calc_Spider_stack(self): + g = MockGame() + stack = Spider_RowStack(0, 0, g) + for s, r in [(2, 5), (3, 7), (2, 7), (2, 0), (2, 3), (2, 5), (1, 4)]: + c = AbstractCard(1000+r*100+s*10, 0, s, r, g) + c.face_up = True + c.item = MockItem() + stack.addCard(c) + return stack + + def test_Spider_canMoveCards_non_top(self): + stack = self._calc_Spider_stack() + self.assertFalse(stack.canMoveCards(stack.cards[5:])) + self.assertTrue(stack)