Skip to content

Commit

Permalink
Update redeals for Devil's Grip
Browse files Browse the repository at this point in the history
  • Loading branch information
joeraz committed Oct 16, 2024
1 parent 41c17c7 commit b77989c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions html-src/rules/devilsgrip.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1>Devil's Grip</h1>
<p>
Picture Gallery type. 2 decks. No redeal.
Picture Gallery type. 2 decks. Unlimited redeals.

<h3>Object</h3>
<p>
Expand Down Expand Up @@ -32,8 +32,8 @@ <h3>Rules</h3>
can be moved into the rows).
<p>
When there are no moves left, you can deal cards from the talon three at
a time, and move the top card to appropriate row piles. No redeal is
allowed.
a time, and move the top card to appropriate row piles. You can deal through
the deck as many times as needed.
<p>
The game is won if you're able to move all cards to the rows, and all the
piles are placed correctly.
12 changes: 6 additions & 6 deletions pysollib/games/picturegallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ class DevilsGrip(RoyalParade):
StackWrapper(DevilsGrip_TableauStack,
base_rank=3, max_cards=4, dir=3),
]
Talon_Class = StackWrapper(WasteTalonStack, max_rounds=1, num_deal=3)
Talon_Class = StackWrapper(WasteTalonStack, max_rounds=-1, num_deal=3)

NORMAL_OFFSET = True

Expand All @@ -706,13 +706,13 @@ def isGameWon(self):

def fillStack(self, stack):
if not stack.cards and stack in self.s.tableaux:
if self.s.waste.cards:
if self.s.talon.cards:
old_state = self.enterState(self.S_FILL)
self.s.waste.moveMove(1, stack)
self.s.talon.moveMove(1, stack)
self.leaveState(old_state)
elif self.s.talon.cards:
elif self.s.waste.cards:
old_state = self.enterState(self.S_FILL)
self.s.talon.moveMove(1, stack)
self.s.waste.moveMove(1, stack)
self.leaveState(old_state)


Expand Down Expand Up @@ -746,7 +746,7 @@ def fillStack(self, stack):
registerGame(GameInfo(928, HugePictureGallery, "Huge Picture Gallery",
GI.GT_PICTURE_GALLERY, 4, 0, GI.SL_BALANCED))
registerGame(GameInfo(932, DevilsGrip, "Devil's Grip",
GI.GT_PICTURE_GALLERY | GI.GT_STRIPPED, 2, 0,
GI.GT_PICTURE_GALLERY | GI.GT_STRIPPED, 2, -1,
GI.SL_MOSTLY_LUCK,
ranks=list(range(1, 13)) # without Aces
))
Expand Down

0 comments on commit b77989c

Please sign in to comment.