From ebae446b330065943d88a707854fae1731db150b Mon Sep 17 00:00:00 2001 From: Joe R Date: Sun, 23 Oct 2022 15:31:19 -0400 Subject: [PATCH] Added Tasmanian Patience game. --- html-src/rules/tasmanianpatience.html | 13 +++++++++++++ pysollib/gamedb.py | 2 +- pysollib/games/yukon.py | 13 +++++++++++-- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 html-src/rules/tasmanianpatience.html diff --git a/html-src/rules/tasmanianpatience.html b/html-src/rules/tasmanianpatience.html new file mode 100644 index 00000000..1bf55d79 --- /dev/null +++ b/html-src/rules/tasmanianpatience.html @@ -0,0 +1,13 @@ +

Tasmanian Patience

+

+Yukon type. 1 deck. Unlimited redeals. + +

Object

+

+Move all cards to the foundations. + +

Quick Description

+

+Like Australian Patience, +but cards are dealt from the talon three at a time, with unlimited +redeals allowed. diff --git a/pysollib/gamedb.py b/pysollib/gamedb.py index 12bc57fd..9e6047c6 100644 --- a/pysollib/gamedb.py +++ b/pysollib/gamedb.py @@ -544,7 +544,7 @@ class GI: tuple(range(22217, 22219))), ('fc-2.14', tuple(range(811, 827))), ('fc-2.15', tuple(range(827, 855)) + tuple(range(22400, 22407))), - ('dev', tuple(range(855, 857))) + ('dev', tuple(range(855, 858))) ) # deprecated - the correct way is to or a GI.GT_XXX flag diff --git a/pysollib/games/yukon.py b/pysollib/games/yukon.py index 00379557..96abc6d3 100644 --- a/pysollib/games/yukon.py +++ b/pysollib/games/yukon.py @@ -455,6 +455,7 @@ class Panopticon(TenAcross): # ************************************************************************ # * Australian Patience +# * Tasmanian Patience # * Raw Prawn # * Bim Bom # ************************************************************************ @@ -463,11 +464,12 @@ class AustralianPatience(RussianSolitaire): RowStack_Class = StackWrapper(Yukon_SS_RowStack, base_rank=KING) - def createGame(self, rows=7): + def createGame(self, rows=7, max_rounds=1, num_deal=1): l, s = Layout(self), self.s Layout.klondikeLayout(l, rows=rows, waste=1) self.setSize(l.size[0], l.size[1]) - s.talon = WasteTalonStack(l.s.talon.x, l.s.talon.y, self, max_rounds=1) + s.talon = WasteTalonStack(l.s.talon.x, l.s.talon.y, self, + max_rounds=max_rounds, num_deal=num_deal) s.waste = WasteStack(l.s.waste.x, l.s.waste.y, self) for r in l.s.foundations: s.foundations.append( @@ -480,6 +482,11 @@ class AustralianPatience(RussianSolitaire): self._startDealNumRowsAndDealRowAndCards(3) +class TasmanianPatience(AustralianPatience): + def createGame(self): + AustralianPatience.createGame(self, max_rounds=-1, num_deal=3) + + class RawPrawn(AustralianPatience): RowStack_Class = Yukon_SS_RowStack @@ -809,3 +816,5 @@ registerGame(GameInfo(732, Wave, "Wave", GI.GT_YUKON | GI.GT_ORIGINAL, 2, 0, GI.SL_BALANCED)) registerGame(GameInfo(826, YukonicPlague, "Yukonic Plague", GI.GT_YUKON, 1, 0, GI.SL_BALANCED)) +registerGame(GameInfo(857, TasmanianPatience, "Tasmanian Patience", + GI.GT_YUKON, 1, -1, GI.SL_BALANCED))