Skip to content

Commit

Permalink
Added quad deck game variants.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeraz committed Sep 22, 2023
1 parent ae9aa78 commit b455e38
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<h1>Double Klondike by Threes</h1>
<p>
Klondike type. 2 decks. Unlimited redeals.

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

<h3>Quick Description</h3>
<p>
Like <a href="doubleklondike.html">Double Klondike</a>,
but deal three cards from the talon at a time.
<h1>Double Klondike (Draw 3)</h1>
<p>
Klondike type. 2 decks. Unlimited redeals.

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

<h3>Quick Description</h3>
<p>
Like <a href="doubleklondike.html">Double Klondike</a>,
but deal three cards from the talon at a time.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<h1>Klondike by Threes</h1>
<p>
Klondike type. 1 deck. Unlimited redeals.

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

<h3>Quick Description</h3>
<p>
Like <a href="klondike.html">Klondike</a>,
but deal three cards from the talon at a time.
<h1>Klondike (Draw 3)</h1>
<p>
Klondike type. 1 deck. Unlimited redeals.

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

<h3>Quick Description</h3>
<p>
Like <a href="klondike.html">Klondike</a>,
but deal three cards from the talon at a time.
12 changes: 12 additions & 0 deletions html-src/rules/quadruplecanfield.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<h1>Quadruple Canfield</h1>
<p>
Canfield type. 4 decks. Unlimited redeals.

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

<h3>Quick Description</h3>
<p>
Like <a href="canfield.html">Canfield</a>,
but with four decks and eight playing piles.
12 changes: 12 additions & 0 deletions html-src/rules/quadrupleklondike.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<h1>Quadruple Klondike</h1>
<p>
Klondike type. 4 decks. Unlimited redeals.

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

<h3>Quick Description</h3>
<p>
Like <a href="klondike.html">Klondike</a>,
but with four decks and 16 playing piles.
12 changes: 12 additions & 0 deletions html-src/rules/quadrupleklondikedraw3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<h1>Quadruple Klondike (Draw 3)</h1>
<p>
Klondike type. 4 decks. Unlimited redeals.

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

<h3>Quick Description</h3>
<p>
Like <a href="quadrupleklondike.html">Quadruple Klondike</a>,
but deal three cards from the talon at a time.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<h1>Triple Klondike by Threes</h1>
<p>
Klondike type. 3 decks. Unlimited redeals.

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

<h3>Quick Description</h3>
<p>
Like <a href="tripleklondike.html">Triple Klondike</a>,
but deal three cards from the talon at a time.
<h1>Triple Klondike (Draw 3)</h1>
<p>
Klondike type. 3 decks. Unlimited redeals.

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

<h3>Quick Description</h3>
<p>
Like <a href="tripleklondike.html">Triple Klondike</a>,
but deal three cards from the talon at a time.
4 changes: 2 additions & 2 deletions pysollib/gamedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))),
)

Expand Down Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions pysollib/games/canfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
# ************************************************************************
Expand Down Expand Up @@ -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))
24 changes: 22 additions & 2 deletions pysollib/games/harp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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))
Expand Down Expand Up @@ -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))
5 changes: 3 additions & 2 deletions pysollib/games/klondike.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit b455e38

Please sign in to comment.