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

Compare commits

...

3 commits

5 changed files with 21 additions and 20 deletions

View file

@ -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>
@ -32,8 +32,8 @@ from the waste or talon (this is the only way the remaining 2s, 3s, and 4s
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.

View file

@ -26,4 +26,5 @@ Hanoi Puzzle is a card-based version of the classic Tower of Hanoi
puzzle. It is traditionally played with different size disks.
<p>
For a given number of cards, the minimum number of moves to solve
the puzzle is one less than double the number of cards (2n - 1).
the puzzle is one less than two to a power of the number of cards
(2^n - 1).

View file

@ -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
@ -706,14 +706,14 @@ class DevilsGrip(RoyalParade):
def fillStack(self, stack):
if not stack.cards and stack in self.s.tableaux:
if self.s.waste.cards:
old_state = self.enterState(self.S_FILL)
self.s.waste.moveMove(1, stack)
self.leaveState(old_state)
elif self.s.talon.cards:
if self.s.talon.cards:
old_state = self.enterState(self.S_FILL)
self.s.talon.moveMove(1, stack)
self.leaveState(old_state)
elif self.s.waste.cards:
old_state = self.enterState(self.S_FILL)
self.s.waste.moveMove(1, stack)
self.leaveState(old_state)
# register the game
@ -746,7 +746,7 @@ registerGame(GameInfo(927, BigPictureGallery, "Big Picture Gallery",
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
))

View file

@ -160,14 +160,14 @@ class Game_StatsDialog:
store = self._createStatsList()
formatter = StatsFormatter(app, store)
formatter.writeStats(player)
# full log
store = self._createLogList('full_log_treeview')
formatter = LogFormatter(app, store)
formatter.writeFullLog(player)
# session log
store = self._createLogList('session_log_treeview')
formatter = LogFormatter(app, store)
formatter.writeSessionLog(player)
# full log
store = self._createLogList('full_log_treeview')
formatter = LogFormatter(app, store)
formatter.writeFullLog(player)
#
self._translateLabels()
dialog = self.widgets_tree.get_widget('stats_dialog')

View file

@ -522,16 +522,16 @@ class LogDialog(MfxDialog):
self.notebook_tabs = []
full_frame = FullLogFrame(self, notebook, app, player)
notebook.add(full_frame, text=_('Full log'))
self.full_log_frame = full_frame
self.notebook_tabs.append(full_frame._w)
session_frame = SessionLogFrame(self, notebook, app, player)
notebook.add(session_frame, text=_('Session log'))
self.session_log_frame = session_frame
self.notebook_tabs.append(session_frame._w)
full_frame = FullLogFrame(self, notebook, app, player)
notebook.add(full_frame, text=_('Full log'))
self.full_log_frame = full_frame
self.notebook_tabs.append(full_frame._w)
notebook.select(LogDialog.SELECTED_TAB)
bind(notebook, '<<NotebookTabChanged>>', self.tabChanged)