diff --git a/html-src/rules/sixbysix.html b/html-src/rules/sixbysix.html new file mode 100644 index 00000000..8e40de8c --- /dev/null +++ b/html-src/rules/sixbysix.html @@ -0,0 +1,14 @@ +
+One-Deck game type. 1 deck. No redeal. + +
+Move all cards to the foundations. + +
+Like Thirty Six, +but cards from the talon are dealt straight to the +first tableau pile, and only same suit sequences +can be moved between tableau piles. diff --git a/html-src/rules/thirtysix.html b/html-src/rules/thirtysix.html index 186c3726..b51b04df 100644 --- a/html-src/rules/thirtysix.html +++ b/html-src/rules/thirtysix.html @@ -9,10 +9,10 @@ Move all cards to the foundations.
Cards are dealt to six tableau piles of six cards -each. During the initial deal, any card that would be -dealt but can be moved to a foundation is moved there -immediately. Tableau piles are built down by rank, -regardless of suit. +each. During the initial deal, any ace that would be +dealt is instead moved to the foundation immediately. +Tableau piles are built down by rank, regardless of +suit.
Cards can be dealt from the talon one at a time. No redeal is allowed. diff --git a/po/de_pysol.po b/po/de_pysol.po index 5b31872d..22ae8158 100644 --- a/po/de_pysol.po +++ b/po/de_pysol.po @@ -1698,6 +1698,9 @@ msgstr "Ablegen in Zwischentalon" msgid "Deal to tableau" msgstr "Lege auf das Tableau" +msgid "Deal to first tableau" +msgstr "" + #: pysollib/wizardutil.py:142 msgid "Deal to reserves" msgstr "Lege in die Reserve" diff --git a/po/fr_pysol.po b/po/fr_pysol.po index acb411d0..3b966d7a 100644 --- a/po/fr_pysol.po +++ b/po/fr_pysol.po @@ -1728,6 +1728,9 @@ msgstr "Distribuer à la défausse" msgid "Deal to tableau" msgstr "Distribuer au tableau" +msgid "Deal to first tableau" +msgstr "" + #: pysollib/wizardutil.py:142 msgid "Deal to reserves" msgstr "Distribuer aux réserves" diff --git a/po/it_pysol.po b/po/it_pysol.po index 67ba0154..327d8f6a 100644 --- a/po/it_pysol.po +++ b/po/it_pysol.po @@ -1736,6 +1736,9 @@ msgstr "Manda nel pozzo" msgid "Deal to tableau" msgstr "Manda nel tableau" +msgid "Deal to first tableau" +msgstr "" + #: pysollib/wizardutil.py:142 msgid "Deal to reserves" msgstr "Manda nella riserva" diff --git a/po/pl_pysol.po b/po/pl_pysol.po index 93aa4594..e779fb79 100644 --- a/po/pl_pysol.po +++ b/po/pl_pysol.po @@ -1732,6 +1732,9 @@ msgstr "Przełóż do zrzutu" msgid "Deal to tableau" msgstr "Przełóż na stół gry" +msgid "Deal to first tableau" +msgstr "" + #: pysollib/wizardutil.py:142 msgid "Deal to reserves" msgstr "Przełóż na stos rezerwowy" diff --git a/po/pysol.pot b/po/pysol.pot index dd897987..bd740ecc 100644 --- a/po/pysol.pot +++ b/po/pysol.pot @@ -1620,6 +1620,9 @@ msgstr "" msgid "Deal to tableau" msgstr "" +msgid "Deal to first tableau" +msgstr "" + #: pysollib/wizardutil.py:142 msgid "Deal to reserves" msgstr "" diff --git a/po/ru_pysol.po b/po/ru_pysol.po index 2c79fccc..84c85a91 100644 --- a/po/ru_pysol.po +++ b/po/ru_pysol.po @@ -1728,6 +1728,9 @@ msgstr "Сдавать на сброс" msgid "Deal to tableau" msgstr "Сдавать на игровой стол" +msgid "Deal to first tableau" +msgstr "" + #: pysollib/wizardutil.py:142 msgid "Deal to reserves" msgstr "Сдавать на резервные ячейки" diff --git a/pysollib/gamedb.py b/pysollib/gamedb.py index cdb53ce0..b3989434 100644 --- a/pysollib/gamedb.py +++ b/pysollib/gamedb.py @@ -378,8 +378,7 @@ class GI: # Solitude for Windows # still missing: - # Bowling (Sackson version), Four Kingdoms, Icicles, - # Six By Six + # Bowling (Sackson version), Four Kingdoms, Icicles ("Solitude for Windows", ( 2, 8, 11, 13, 19, 24, 25, 29, 30, 31, 33, 34, 36, 38, 42, 43, 45, 48, 50, 53, 56, 57, 58, 62, 64, 67, 69, 71, 86, 87, @@ -387,7 +386,7 @@ class GI: 128, 133, 134, 135, 139, 146, 147, 171, 172, 173, 221, 222, 224, 228, 233, 234, 235, 256, 257, 258, 282, 314, 327, 330, 355, 356, 398, 406, 414, 418, 434, 437, 484, 593, 715, 716, - 737, 751, 805, 830, 845, 847, 901, 903 + 737, 751, 805, 830, 845, 847, 888, 901, 903 )), # XM Solitaire @@ -552,7 +551,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, 888))) + ('dev', tuple(range(855, 889))) ) # deprecated - the correct way is to or a GI.GT_XXX flag diff --git a/pysollib/games/klondike.py b/pysollib/games/klondike.py index 37131f98..c048523c 100644 --- a/pysollib/games/klondike.py +++ b/pysollib/games/klondike.py @@ -35,6 +35,7 @@ from pysollib.pysoltk import MfxCanvasText from pysollib.stack import \ AC_RowStack, \ BO_RowStack, \ + DealFirstRowTalonStack, \ DealRowTalonStack, \ InitialDealTalonStack, \ KingAC_RowStack, \ @@ -905,6 +906,7 @@ class Lanes(Klondike): # ************************************************************************ # * Thirty Six +# * Six By Six # ************************************************************************ class ThirtySix(Klondike): @@ -920,7 +922,7 @@ class ThirtySix(Klondike): if r.cards: c = r.cards[-1] for f in self.s.foundations: - if f.acceptsCards(r, [c]): + if f.acceptsCards(r, [c]) and c.rank == ACE: self.moveMove(1, r, f, frames=4, shadow=0) return 1 return 0 @@ -937,6 +939,23 @@ class ThirtySix(Klondike): shallHighlightMatch = Game._shallHighlightMatch_RK +class SixBySix(ThirtySix): + + Talon_Class = StackWrapper(DealFirstRowTalonStack, max_move=0) + RowStack_Class = StackWrapper(Spider_SS_RowStack, base_rank=ANY_RANK) + + def createGame(self): + Klondike.createGame(self, rows=6, max_rounds=1, waste=0) + + def startGame(self): + self.startDealSample() + for i in range(6): + self.s.talon.dealRow() + while True: + if not self._fillOne(): + break + + # ************************************************************************ # * Q.C. # ************************************************************************ @@ -1656,3 +1675,5 @@ registerGame(GameInfo(869, Smokey, "Smokey", GI.GT_KLONDIKE, 1, 2, GI.SL_BALANCED)) registerGame(GameInfo(873, AgnesTwo, "Agnes Two", GI.GT_RAGLAN, 2, 0, GI.SL_BALANCED)) +registerGame(GameInfo(888, SixBySix, "Six by Six", + GI.GT_1DECK_TYPE, 1, 0, GI.SL_BALANCED)) diff --git a/pysollib/stack.py b/pysollib/stack.py index 344df4ef..f634eb8b 100644 --- a/pysollib/stack.py +++ b/pysollib/stack.py @@ -1994,6 +1994,12 @@ class DealRowTalonStack(TalonStack): return self.dealRowAvail(sound=sound) +# A single click deals one card to each of the RowStacks. +class DealFirstRowTalonStack(TalonStack): + def dealCards(self, sound=False): + return self.dealRowAvail(sound=sound, rows=(self.game.s.rows[0],)) + + # For games where the Talon is only used for the initial dealing. class InitialDealTalonStack(TalonStack): # no bindings @@ -2048,6 +2054,17 @@ class DealRowRedealTalonStack(TalonStack, RedealCards_StackMethods): rows=rows, shuffle=True) +class DealFirstRowRedealTalonStack(DealRowRedealTalonStack): + + def canDealCards(self, rows=None): + return DealRowRedealTalonStack.canDealCards( + self, rows=self.game.s.reserves) + + def dealCards(self, sound=False, rows=None): + return DealRowRedealTalonStack.dealCards( + self, sound=sound, rows=(self.game.s.rows[0],)) + + class DealReserveRedealTalonStack(DealRowRedealTalonStack): def canDealCards(self, rows=None): diff --git a/pysollib/wizardutil.py b/pysollib/wizardutil.py index 8c0b1712..9d9ff7bd 100644 --- a/pysollib/wizardutil.py +++ b/pysollib/wizardutil.py @@ -31,6 +31,7 @@ from pysollib.stack import AC_FoundationStack, \ BO_FoundationStack, \ BO_RowStack, \ BasicRowStack, \ + DealFirstRowRedealTalonStack, \ DealReserveRedealTalonStack, \ DealRowRedealTalonStack, \ GroundsForADivorceTalonStack, \ @@ -148,6 +149,7 @@ TalonType = WizSetting( values_map=((n_('Deal all cards at the beginning'), InitialDealTalonStack), (n_('Deal to waste'), WasteTalonStack), (n_('Deal to tableau'), DealRowRedealTalonStack), + (n_('Deal to first tableau'), DealFirstRowRedealTalonStack), (n_('Deal to reserves'), DealReserveRedealTalonStack), (n_('Spider'), SpiderTalonStack), (n_('Grounds for a Divorce'), GroundsForADivorceTalonStack),