mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Prevent moving stacks to the foundation in Ace of Hearts
This commit is contained in:
parent
3a356670bb
commit
b26821048c
1 changed files with 4 additions and 2 deletions
|
@ -1011,7 +1011,8 @@ class SwissPatience(Gypsy):
|
||||||
class AceOfHearts_Foundation(RK_FoundationStack):
|
class AceOfHearts_Foundation(RK_FoundationStack):
|
||||||
def acceptsCards(self, from_stack, cards):
|
def acceptsCards(self, from_stack, cards):
|
||||||
if not self.cards:
|
if not self.cards:
|
||||||
return cards[0].suit == HEART and cards[0].rank == ACE
|
return len(cards) == 1 and cards[0].suit == HEART and \
|
||||||
|
cards[0].rank == ACE
|
||||||
return RK_FoundationStack.acceptsCards(self, from_stack, cards)
|
return RK_FoundationStack.acceptsCards(self, from_stack, cards)
|
||||||
|
|
||||||
def getBottomImage(self):
|
def getBottomImage(self):
|
||||||
|
@ -1034,7 +1035,8 @@ class AceOfHearts(Game):
|
||||||
r = l.s.foundations[3]
|
r = l.s.foundations[3]
|
||||||
s.foundations.append(
|
s.foundations.append(
|
||||||
AceOfHearts_Foundation(r.x, r.y, self, suit=HEART,
|
AceOfHearts_Foundation(r.x, r.y, self, suit=HEART,
|
||||||
max_cards=52, mod=13))
|
max_cards=52, max_accept=1,
|
||||||
|
mod=13))
|
||||||
for r in l.s.rows:
|
for r in l.s.rows:
|
||||||
s.rows.append(Yukon_SS_RowStack(r.x, r.y, self,
|
s.rows.append(Yukon_SS_RowStack(r.x, r.y, self,
|
||||||
base_rank=KING))
|
base_rank=KING))
|
||||||
|
|
Loading…
Add table
Reference in a new issue