Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pysollib/games/spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ def _preferHighRankMoves(self):
return 1

def shallMovePile(self, r, t, pile, rpile):
# the pile we are going to move from r to t
# could be moved back from t ro r - this is
# dangerous for as we can create loops...
if len(t.cards) == 0:
return t.acceptsCards(r, pile)
if not SpiderType_Hint.shallMovePile(self, r, t, pile, rpile):
return False
rr = self.ClonedStack(r, stackcards=rpile)
if rr.acceptsCards(t, pile):
# the pile we are going to move from r to t
# could be moved back from t ro r - this is
# dangerous for as we can create loops...
if len(t.cards) == 0:
return True
if pile[0].suit == t.cards[-1].suit:
# The pile will get moved onto the correct suit
if len(rpile) == 0 or pile[0].suit != rpile[-1].suit:
Expand Down