Skip to content

Commit 41a30dd

Browse files
committed
Add Palace game
1 parent 041f9ab commit 41a30dd

3 files changed

Lines changed: 32 additions & 2 deletions

File tree

html-src/rules/palace.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<h1>Palace</h1>
2+
<p>
3+
Beleaguered Castle type. 4 decks. No redeal.
4+
5+
<h3>Object</h3>
6+
<p>
7+
Move all cards to the foundations.
8+
9+
<h3>Quick Description</h3>
10+
<p>
11+
Like <a href="lightweight.html">Lightweight</a>,
12+
but with four decks, eighteen piles, and sequences of cards
13+
can only be moved if they're of the same suit.
14+
<p>
15+
A variant of <a href="castlemount.html">Castle Mount</a>.

pysollib/gamedb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ def _callback(gi, gt=game_type):
513513
("Thomas Warfield", (189, 264, 300, 320, 336, 337, 359,
514514
415, 427, 458, 495, 496, 497, 508,
515515
800, 814, 820, 825, 889, 911, 926,
516-
941, 966, 983)),
516+
941, 966, 983, 986)),
517517
("Mary Whitmore Jones", (421, 624,)),
518518
("Jan Wolter", (917, 939, 946, 963,)),
519519
)
@@ -607,7 +607,7 @@ def _callback(gi, gt=game_type):
607607
('fc-3.4', tuple(range(971, 981)) + tuple(range(5419, 5421)) +
608608
tuple(range(16683, 16686)) + tuple(range(18005, 18007)) +
609609
(44, 526, 5906, 22399,)),
610-
('dev', tuple(range(981, 986)) + tuple(range(16686, 16687))),
610+
('dev', tuple(range(981, 987)) + tuple(range(16686, 16687))),
611611
)
612612

613613
# deprecated - the correct way is to or a GI.GT_XXX flag

pysollib/games/beleagueredcastle.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,7 @@ def fillStack(self, stack):
755755
# ************************************************************************
756756
# * Lightweight
757757
# * Castle Mount
758+
# * Palace
758759
# ************************************************************************
759760

760761
class Lightweight(StreetsAndAlleys):
@@ -805,6 +806,17 @@ class CastleMount(Lightweight):
805806
getQuickPlayScore = Game._getSpiderQuickPlayScore
806807

807808

809+
class Palace(CastleMount):
810+
811+
def createGame(self):
812+
Lightweight.createGame(self, rows=18)
813+
814+
def startGame(self):
815+
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
816+
self._startDealNumRows(10)
817+
self.s.talon.dealRowAvail()
818+
819+
808820
# ************************************************************************
809821
# * Selective Castle
810822
# ************************************************************************
@@ -961,3 +973,6 @@ class PenelopesWeb(StreetsAndAlleys):
961973
registerGame(GameInfo(951, Morphy, "Morphy",
962974
GI.GT_BELEAGUERED_CASTLE | GI.GT_OPEN, 1, 0,
963975
GI.SL_SKILL))
976+
registerGame(GameInfo(986, Palace, "Palace",
977+
GI.GT_BELEAGUERED_CASTLE | GI.GT_OPEN, 4, 0,
978+
GI.SL_MOSTLY_SKILL))

0 commit comments

Comments
 (0)