Skip to content

Commit

Permalink
Restore lost Outback Patience game, with the correct rules
Browse files Browse the repository at this point in the history
  • Loading branch information
joeraz committed Feb 7, 2025
1 parent 054c0f0 commit ed2da8c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
12 changes: 12 additions & 0 deletions html-src/rules/outbackpatience.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<h1>Outback Patience</h1>
<p>
Yukon type. 2 decks. No redeal.

<h3>Object</h3>
<p>
Move all cards to the foundations.

<h3>Quick Description</h3>
<p>
Like <a href="austalianpatience.html">Australian Patience</a>,
but with two decks, and eight piles of seven cards each.
5 changes: 2 additions & 3 deletions pysollib/gamedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ def _callback(gi, gt=game_type):
904: 68, # Lexington Harp
237: 22231, # Three Peaks
297: 631, # Alternation/Alternations
526: 447, # Australian/Outback Patience
640: 566, # Hypotenuse/Brazilian Patience

# Lost Mahjongg Layouts
Expand Down Expand Up @@ -575,7 +574,7 @@ def _callback(gi, gt=game_type):
('fc-0.9.0', tuple(range(323, 421))),
('fc-0.9.1', tuple(range(421, 441))),
('fc-0.9.2', tuple(range(441, 466))),
('fc-0.9.3', tuple(range(466, 661))),
('fc-0.9.3', tuple(range(466, 526)) + tuple(range(527, 661))),
('fc-0.9.4', tuple(range(661, 671))),
('fc-1.0', tuple(range(671, 711))),
('fc-1.1', tuple(range(711, 759))),
Expand All @@ -595,7 +594,7 @@ def _callback(gi, gt=game_type):
tuple(range(19000, 19012)) + tuple(range(22303, 22311)) +
tuple(range(22353, 22361))),
('fc-3.1', tuple(range(961, 971))),
('dev', tuple(range(971, 973)) + tuple(range(18005, 18007))),
('dev', tuple(range(971, 973)) + tuple(range(18005, 18007)) + (526,)),
)

# deprecated - the correct way is to or a GI.GT_XXX flag
Expand Down
18 changes: 14 additions & 4 deletions pysollib/games/yukon.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ def startGame(self):

# ************************************************************************
# * Australian Patience
# * Outback Patience
# * Tasmanian Patience
# * Canberra
# * Raw Prawn
Expand All @@ -482,9 +483,9 @@ class AustralianPatience(RussianSolitaire):

RowStack_Class = StackWrapper(Yukon_SS_RowStack, base_rank=KING)

def createGame(self, rows=7, max_rounds=1, num_deal=1):
def createGame(self, rows=7, max_rounds=1, num_deal=1, playcards=16):
l, s = Layout(self), self.s
Layout.klondikeLayout(l, rows=rows, waste=1)
Layout.klondikeLayout(l, rows=rows, waste=1, playcards=playcards)
self.setSize(l.size[0], l.size[1])
s.talon = WasteTalonStack(l.s.talon.x, l.s.talon.y, self,
max_rounds=max_rounds, num_deal=num_deal)
Expand All @@ -500,6 +501,14 @@ def startGame(self):
self._startDealNumRowsAndDealRowAndCards(3)


class OutbackPatience(AustralianPatience):
def createGame(self):
AustralianPatience.createGame(self, rows=8, playcards=25)

def startGame(self):
self._startDealNumRowsAndDealRowAndCards(6)


class TasmanianPatience(AustralianPatience):
def createGame(self):
AustralianPatience.createGame(self, max_rounds=-1, num_deal=3)
Expand Down Expand Up @@ -895,8 +904,7 @@ def startGame(self):
GI.GT_YUKON, 1, 0, GI.SL_MOSTLY_SKILL,
altnames=("Roslyn",)))
registerGame(GameInfo(447, AustralianPatience, "Australian Patience",
GI.GT_YUKON, 1, 0, GI.SL_BALANCED,
altnames=('Outback Patience',)))
GI.GT_YUKON, 1, 0, GI.SL_BALANCED))
registerGame(GameInfo(450, RawPrawn, "Raw Prawn",
GI.GT_YUKON, 1, 0, GI.SL_BALANCED))
registerGame(GameInfo(456, BimBom, "Bim Bom",
Expand All @@ -909,6 +917,8 @@ def startGame(self):
GI.GT_YUKON, 1, 0, GI.SL_MOSTLY_SKILL))
registerGame(GameInfo(525, Queensland, "Queensland",
GI.GT_YUKON, 1, 0, GI.SL_BALANCED))
registerGame(GameInfo(526, OutbackPatience, "Outback Patience",
GI.GT_YUKON, 2, 0, GI.SL_BALANCED))
registerGame(GameInfo(530, RussianSpider, "Russian Spider",
GI.GT_SPIDER, 1, 0, GI.SL_BALANCED,
altnames=('Ukrainian Solitaire',)))
Expand Down

0 comments on commit ed2da8c

Please sign in to comment.