1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Compare commits

..

No commits in common. "5e10f11ca5d49e2e9f014b6e516bf9c77bf95754" and "1fbdc2db98de41b72aed6e39af745343dc356fb0" have entirely different histories.

5 changed files with 11 additions and 17 deletions

View file

@ -65,3 +65,4 @@ cache:
- C:\_P5 -> .appveyor.yml
- C:\strawberry -> .appveyor.yml
shallow_clone: true

View file

@ -329,7 +329,7 @@ class Rachel(pysollib.game.StartDealRowAndCards, RelaxedSpider):
# * Scorpion Tail - building down by alternate color
# ************************************************************************
class Scorpion_RowStack(Yukon_SS_RowStack, Spider_RowStack):
class Scorpion_RowStack(Spider_RowStack, Yukon_SS_RowStack):
canDropCards = Spider_RowStack.canDropCards

View file

@ -2474,8 +2474,6 @@ class BasicRowStack(OpenStack):
# Abstract class.
class SequenceRowStack(SequenceStack_StackMethods, BasicRowStack):
canMoveCards = OpenStack.canMoveCards
def __init__(self, x, y, game, **cap):
kwdefault(cap, max_move=999999, max_accept=999999)
BasicRowStack.__init__(self, x, y, game, **cap)

View file

@ -18,7 +18,7 @@ my $abs_bindir = File::Spec->rel2abs($bindir);
# Whether to use prove instead of runprove.
my $use_prove = $ENV{FCS_USE_TEST_RUN} ? 0 : 1;
my $num_jobs = $ENV{TEST_JOBS};
my $num_jobs = $ENV{TEST_JOBS};
sub _is_parallized
{
@ -133,7 +133,7 @@ sub myglob
);
my $is_ninja = ( -e "build.ninja" );
my $MAKE = $IS_WIN ? 'gmake' : 'make';
my $MAKE = $IS_WIN ? 'gmake' : 'make';
if ($is_ninja)
{
system( "ninja", "pretest" );

View file

@ -39,22 +39,17 @@ class Mock_S_Game:
class MyTests(unittest.TestCase):
def _calc_Scorpion_stack(self):
def test_import(self):
g = MockGame()
stack = Scorpion_RowStack(0, 0, g)
for s, r in [(2, 5), (3, 7), (2, 7), (2, 0), (2, 3), (2, 4), (1, 4)]:
c = AbstractCard(1000+r*100+s*10, 0, s, r, g)
cards = [
AbstractCard(1000+r*100+s*10, 0, s, r, g)
for s, r in [(2, 5), (3, 7), (2, 7), (2, 0),
(2, 3), (2, 4), (1, 4)]
]
for c in cards:
c.face_up = True
c.item = MockItem()
stack.addCard(c)
return stack
def test_canMoveCards(self):
stack = self._calc_Scorpion_stack()
stack.canMoveCards(stack.cards[6:])
self.assertTrue(stack)
def test_canMoveCards_non_top(self):
stack = self._calc_Scorpion_stack()
self.assertTrue(stack.canMoveCards(stack.cards[4:]))
self.assertTrue(stack)