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

Fix for card flipping issue in Crossword.

This commit is contained in:
Joe R 2021-07-04 13:06:28 -04:00
parent e9b0675884
commit 2ccad87c26

View file

@ -28,13 +28,14 @@ from pysollib.stack import \
OpenTalonStack, \ OpenTalonStack, \
ReserveStack, \ ReserveStack, \
Stack, \ Stack, \
StackWrapper StackWrapper, \
cardsFaceDown
# ************************************************************************ # ************************************************************************
# * Crossword # * Crossword
# ************************************************************************ # ************************************************************************
class Crossword_RowStack(ReserveStack): class Crossword_RowStack(ReserveStack):
def clickHandler(self, event): def clickHandler(self, event):
if (not self.cards and self.game.s.talon.cards and if (not self.cards and self.game.s.talon.cards and
@ -54,7 +55,7 @@ class Crossword_RowStack(ReserveStack):
return False return False
def closeStack(self): def closeStack(self):
if (self.cards[0].rank >= 10): if self.cards[0].rank >= 10 and not cardsFaceDown(self.cards):
self.flipMove() self.flipMove()
if len(self.game.s.talon.cards) == 4: if len(self.game.s.talon.cards) == 4:
self.game.s.talon.flipMove() self.game.s.talon.flipMove()