From acce41b77cbdfc32e7863ff6d7b5d23021eedef3 Mon Sep 17 00:00:00 2001 From: brandon wright <33914549+bwrightkc@users.noreply.github.com> Date: Fri, 14 Aug 2026 16:54:27 -0500 Subject: [PATCH 1/2] move empty check --- pysollib/games/spider.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pysollib/games/spider.py b/pysollib/games/spider.py index 2f1630b08..56877013d 100644 --- a/pysollib/games/spider.py +++ b/pysollib/games/spider.py @@ -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: From adee1773b38718c0e3eb18a04ac57a921f32d219 Mon Sep 17 00:00:00 2001 From: brandon wright <33914549+bwrightkc@users.noreply.github.com> Date: Mon, 17 Aug 2026 13:02:34 -0500 Subject: [PATCH 2/2] Fix syntax error in spider hint (tabs, missing colon) --- pysollib/games/spider.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pysollib/games/spider.py b/pysollib/games/spider.py index 56877013d..911f6891a 100644 --- a/pysollib/games/spider.py +++ b/pysollib/games/spider.py @@ -82,11 +82,11 @@ 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) + # 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)