diff --git a/pysollib/games/pyramid.py b/pysollib/games/pyramid.py index 2b49cbfa..0cc86032 100644 --- a/pysollib/games/pyramid.py +++ b/pysollib/games/pyramid.py @@ -82,8 +82,10 @@ class Pyramid_StackMethods: def _dropPairMove(self, n, other_stack, frames=-1, shadow=-1): if not self.game.demo: self.game.playSample("droppair", priority=200) - assert n == 1 and self.acceptsCards( - other_stack, [other_stack.cards[-1]]) + if not (n == 1 + and other_stack.cards + and self.acceptsCards(other_stack, [other_stack.cards[-1]])): + return old_state = self.game.enterState(self.game.S_FILL) f = self.game.s.foundations[0] self.game.moveMove(n, self, f, frames=frames, shadow=shadow) diff --git a/pysollib/stack.py b/pysollib/stack.py index e34e7ca4..1ec6d66c 100644 --- a/pysollib/stack.py +++ b/pysollib/stack.py @@ -2935,9 +2935,10 @@ class FaceUpWasteTalonStack(WasteTalonStack): self.game.fillStack(self) def dealCards(self, sound=False): - WasteTalonStack.dealCards(self, sound=sound) + retval = WasteTalonStack.dealCards(self, sound=sound) if self.canFlipCard(): self.flipMove() + return retval class OpenTalonStack(TalonStack, OpenStack):