From b455e386f153130176b8499ff2227019d48aaafd Mon Sep 17 00:00:00 2001 From: Joe R Date: Fri, 22 Sep 2023 19:04:06 -0400 Subject: [PATCH] Added quad deck game variants. --- ...bythrees.html => doubleklondikedraw3.html} | 24 +++++++++---------- ...ondikebythrees.html => klondikedraw3.html} | 24 +++++++++---------- html-src/rules/quadruplecanfield.html | 12 ++++++++++ html-src/rules/quadrupleklondike.html | 12 ++++++++++ html-src/rules/quadrupleklondikedraw3.html | 12 ++++++++++ ...bythrees.html => tripleklondikedraw3.html} | 24 +++++++++---------- pysollib/gamedb.py | 4 ++-- pysollib/games/canfield.py | 13 ++++++++++ pysollib/games/harp.py | 24 +++++++++++++++++-- pysollib/games/klondike.py | 5 ++-- 10 files changed, 112 insertions(+), 42 deletions(-) rename html-src/rules/{doubleklondikebythrees.html => doubleklondikedraw3.html} (83%) rename html-src/rules/{klondikebythrees.html => klondikedraw3.html} (84%) create mode 100644 html-src/rules/quadruplecanfield.html create mode 100644 html-src/rules/quadrupleklondike.html create mode 100644 html-src/rules/quadrupleklondikedraw3.html rename html-src/rules/{tripleklondikebythrees.html => tripleklondikedraw3.html} (83%) diff --git a/html-src/rules/doubleklondikebythrees.html b/html-src/rules/doubleklondikedraw3.html similarity index 83% rename from html-src/rules/doubleklondikebythrees.html rename to html-src/rules/doubleklondikedraw3.html index 65a5885274..2bbe4c9364 100644 --- a/html-src/rules/doubleklondikebythrees.html +++ b/html-src/rules/doubleklondikedraw3.html @@ -1,12 +1,12 @@ -

Double Klondike by Threes

-

-Klondike type. 2 decks. Unlimited redeals. - -

Object

-

-Move all cards to the foundations. - -

Quick Description

-

-Like Double Klondike, -but deal three cards from the talon at a time. +

Double Klondike (Draw 3)

+

+Klondike type. 2 decks. Unlimited redeals. + +

Object

+

+Move all cards to the foundations. + +

Quick Description

+

+Like Double Klondike, +but deal three cards from the talon at a time. diff --git a/html-src/rules/klondikebythrees.html b/html-src/rules/klondikedraw3.html similarity index 84% rename from html-src/rules/klondikebythrees.html rename to html-src/rules/klondikedraw3.html index 87a951ba9c..ee67b5183f 100644 --- a/html-src/rules/klondikebythrees.html +++ b/html-src/rules/klondikedraw3.html @@ -1,12 +1,12 @@ -

Klondike by Threes

-

-Klondike type. 1 deck. Unlimited redeals. - -

Object

-

-Move all cards to the foundations. - -

Quick Description

-

-Like Klondike, -but deal three cards from the talon at a time. +

Klondike (Draw 3)

+

+Klondike type. 1 deck. Unlimited redeals. + +

Object

+

+Move all cards to the foundations. + +

Quick Description

+

+Like Klondike, +but deal three cards from the talon at a time. diff --git a/html-src/rules/quadruplecanfield.html b/html-src/rules/quadruplecanfield.html new file mode 100644 index 0000000000..2381390fa6 --- /dev/null +++ b/html-src/rules/quadruplecanfield.html @@ -0,0 +1,12 @@ +

Quadruple Canfield

+

+Canfield type. 4 decks. Unlimited redeals. + +

Object

+

+Move all cards to the foundations. + +

Quick Description

+

+Like Canfield, +but with four decks and eight playing piles. diff --git a/html-src/rules/quadrupleklondike.html b/html-src/rules/quadrupleklondike.html new file mode 100644 index 0000000000..1f534c35be --- /dev/null +++ b/html-src/rules/quadrupleklondike.html @@ -0,0 +1,12 @@ +

Quadruple Klondike

+

+Klondike type. 4 decks. Unlimited redeals. + +

Object

+

+Move all cards to the foundations. + +

Quick Description

+

+Like Klondike, +but with four decks and 16 playing piles. diff --git a/html-src/rules/quadrupleklondikedraw3.html b/html-src/rules/quadrupleklondikedraw3.html new file mode 100644 index 0000000000..fc89145a94 --- /dev/null +++ b/html-src/rules/quadrupleklondikedraw3.html @@ -0,0 +1,12 @@ +

Quadruple Klondike (Draw 3)

+

+Klondike type. 4 decks. Unlimited redeals. + +

Object

+

+Move all cards to the foundations. + +

Quick Description

+

+Like Quadruple Klondike, +but deal three cards from the talon at a time. diff --git a/html-src/rules/tripleklondikebythrees.html b/html-src/rules/tripleklondikedraw3.html similarity index 83% rename from html-src/rules/tripleklondikebythrees.html rename to html-src/rules/tripleklondikedraw3.html index cabfc09447..1a743a3c11 100644 --- a/html-src/rules/tripleklondikebythrees.html +++ b/html-src/rules/tripleklondikedraw3.html @@ -1,12 +1,12 @@ -

Triple Klondike by Threes

-

-Klondike type. 3 decks. Unlimited redeals. - -

Object

-

-Move all cards to the foundations. - -

Quick Description

-

-Like Triple Klondike, -but deal three cards from the talon at a time. +

Triple Klondike (Draw 3)

+

+Klondike type. 3 decks. Unlimited redeals. + +

Object

+

+Move all cards to the foundations. + +

Quick Description

+

+Like Triple Klondike, +but deal three cards from the talon at a time. diff --git a/pysollib/gamedb.py b/pysollib/gamedb.py index 7692b3d387..b24b33cb2a 100644 --- a/pysollib/gamedb.py +++ b/pysollib/gamedb.py @@ -575,7 +575,7 @@ def _callback(gi, gt=game_type): ('fc-2.20', tuple(range(855, 897))), ('fc-2.21', tuple(range(897, 900)) + tuple(range(11014, 11017)) + tuple(range(13160, 13163)) + (16682,)), - ('dev', tuple(range(906, 920)) + tuple(range(11017, 11020)) + + ('dev', tuple(range(906, 923)) + tuple(range(11017, 11020)) + tuple(range(22303, 22311)) + tuple(range(22353, 22361))), ) @@ -603,7 +603,7 @@ def _callback(gi, gt=game_type): 105, # Canfield 158, # Imperial Trumps 279, # Kings - 903, # Ace Up + 903, # Aces Up 5034, # Mahjongg Flying Dragon 5401, # Mahjongg Taipei 12345, # Oonsoo diff --git a/pysollib/games/canfield.py b/pysollib/games/canfield.py index a0ad4a3d08..631c28ccb5 100644 --- a/pysollib/games/canfield.py +++ b/pysollib/games/canfield.py @@ -652,6 +652,17 @@ def createGame(self): Canfield.createGame(self, rows=7) +# ************************************************************************ +# * Quadruple Canfield +# ************************************************************************ + +class QuadrupleCanfield(Canfield): + INITIAL_RESERVE_CARDS = 39 + + def createGame(self): + Canfield.createGame(self, rows=8) + + # ************************************************************************ # * Acme # ************************************************************************ @@ -1041,3 +1052,5 @@ def createGame(self): altnames="Reno")) registerGame(GameInfo(896, ThePlot, "The Plot", GI.GT_CANFIELD, 2, 0, GI.SL_BALANCED)) +registerGame(GameInfo(922, QuadrupleCanfield, "Quadruple Canfield", + GI.GT_CANFIELD, 4, -1, GI.SL_BALANCED)) diff --git a/pysollib/games/harp.py b/pysollib/games/harp.py index 173f0ebce6..796364acf3 100644 --- a/pysollib/games/harp.py +++ b/pysollib/games/harp.py @@ -182,6 +182,21 @@ def createGame(self): DoubleKlondike.createGame(self, rows=12) +# ************************************************************************ +# * Quadruple Klondike +# * Quadruple Klondike by Threes +# ************************************************************************ + +class QuadrupleKlondike(DoubleKlondike): + def createGame(self): + DoubleKlondike.createGame(self, rows=16) + + +class QuadrupleKlondikeByThrees(DoubleKlondike): + def createGame(self): + DoubleKlondike.createGame(self, rows=16, num_deal=3) + + # ************************************************************************ # * Lady Jane # * Inquisitor @@ -418,7 +433,7 @@ class PittTheYounger(Churchill): # register the game registerGame(GameInfo(21, DoubleKlondike, "Double Klondike", GI.GT_KLONDIKE, 2, -1, GI.SL_BALANCED)) -registerGame(GameInfo(28, DoubleKlondikeByThrees, "Double Klondike by Threes", +registerGame(GameInfo(28, DoubleKlondikeByThrees, "Double Klondike (Draw 3)", GI.GT_KLONDIKE, 2, -1, GI.SL_MOSTLY_LUCK)) registerGame(GameInfo(25, Gargantua, "Gargantua", GI.GT_KLONDIKE, 2, 1, GI.SL_BALANCED, @@ -433,7 +448,7 @@ class PittTheYounger(Churchill): GI.GT_KLONDIKE, 2, 1, GI.SL_BALANCED)) registerGame(GameInfo(273, TripleKlondike, "Triple Klondike", GI.GT_KLONDIKE, 3, -1, GI.SL_BALANCED)) -registerGame(GameInfo(274, TripleKlondikeByThrees, "Triple Klondike by Threes", +registerGame(GameInfo(274, TripleKlondikeByThrees, "Triple Klondike (Draw 3)", GI.GT_KLONDIKE, 3, -1, GI.SL_MOSTLY_LUCK)) registerGame(GameInfo(495, LadyJane, "Lady Jane", GI.GT_KLONDIKE, 2, 1, GI.SL_BALANCED)) @@ -465,3 +480,8 @@ class PittTheYounger(Churchill): altnames=('Prime Minister'))) registerGame(GameInfo(885, PittTheYounger, "Pitt the Younger", GI.GT_GYPSY, 2, 0, GI.SL_BALANCED)) +registerGame(GameInfo(920, QuadrupleKlondike, "Quadruple Klondike", + GI.GT_KLONDIKE, 4, -1, GI.SL_BALANCED)) +registerGame(GameInfo(921, QuadrupleKlondikeByThrees, + "Quadruple Klondike (Draw 3)", + GI.GT_KLONDIKE, 4, -1, GI.SL_BALANCED)) diff --git a/pysollib/games/klondike.py b/pysollib/games/klondike.py index cfb96d275d..8100f5364a 100644 --- a/pysollib/games/klondike.py +++ b/pysollib/games/klondike.py @@ -1617,7 +1617,7 @@ def startGame(self): GI.GT_KLONDIKE | GI.GT_SCORE, 1, 2, GI.SL_BALANCED)) registerGame(GameInfo(129, VegasKlondike, "Vegas Klondike", GI.GT_KLONDIKE | GI.GT_SCORE, 1, 0, GI.SL_BALANCED)) -registerGame(GameInfo(18, KlondikeByThrees, "Klondike by Threes", +registerGame(GameInfo(18, KlondikeByThrees, "Klondike (Draw 3)", GI.GT_KLONDIKE, 1, -1, GI.SL_MOSTLY_LUCK)) registerGame(GameInfo(58, ThumbAndPouch, "Thumb and Pouch", GI.GT_KLONDIKE, 1, 0, GI.SL_MOSTLY_LUCK)) @@ -1680,7 +1680,8 @@ def startGame(self): registerGame(GameInfo(327, ThirtySix, "Thirty-Six", GI.GT_KLONDIKE, 1, 0, GI.SL_BALANCED)) registerGame(GameInfo(350, Q_C_, "Q.C.", - GI.GT_KLONDIKE, 2, 1, GI.SL_BALANCED)) + GI.GT_KLONDIKE, 2, 1, GI.SL_BALANCED, + altnames=("K.C.",))) registerGame(GameInfo(361, NorthwestTerritory, "Northwest Territory", GI.GT_RAGLAN, 1, 0, GI.SL_BALANCED)) registerGame(GameInfo(362, Morehead, "Morehead",