mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added Cromwell game.
This commit is contained in:
parent
20096a88c8
commit
bb06d86a2c
3 changed files with 59 additions and 3 deletions
25
html-src/rules/cromwell.html
Normal file
25
html-src/rules/cromwell.html
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<h1>Cromwell</h1>
|
||||||
|
<p>
|
||||||
|
Fan game type. 2 decks. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the foundations.
|
||||||
|
|
||||||
|
<h3>Rules</h3>
|
||||||
|
<p>
|
||||||
|
Four cards are dealt to each of 26 tableau piles. Tableau
|
||||||
|
piles are built down by suit, and any card or valid sequence
|
||||||
|
of cards can be moved between tableau piles. Empty tableau
|
||||||
|
piles cannot be filled.
|
||||||
|
<p>
|
||||||
|
The foundations are built up by same suit from ace to king -
|
||||||
|
the game is won if all cards are moved to the foundations.
|
||||||
|
<p>
|
||||||
|
Once during the game, any one card below the top of a fan may
|
||||||
|
be drawn out and used on foundations or fan builds.
|
||||||
|
Do this by moving the top card of the fan to the Draw pile.
|
||||||
|
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<p>
|
||||||
|
Cromwell was invented by Charles Jewell.
|
|
@ -457,7 +457,7 @@ class GI:
|
||||||
("Robert Hogue", (22216, 22217, 22218, 22231,)),
|
("Robert Hogue", (22216, 22217, 22218, 22231,)),
|
||||||
("Erik den Hollander", (344, 544,)),
|
("Erik den Hollander", (344, 544,)),
|
||||||
("Rick Holzgrafe", (756, 757,)),
|
("Rick Holzgrafe", (756, 757,)),
|
||||||
("Charles Jewell", (220, 309,)),
|
("Charles Jewell", (220, 309, 894,)),
|
||||||
("Michael Keller", (592, 883,)),
|
("Michael Keller", (592, 883,)),
|
||||||
("Fred Lunde", (459,)),
|
("Fred Lunde", (459,)),
|
||||||
("Mark Masten", (811,)),
|
("Mark Masten", (811,)),
|
||||||
|
@ -558,7 +558,7 @@ class GI:
|
||||||
tuple(range(22217, 22219))),
|
tuple(range(22217, 22219))),
|
||||||
('fc-2.14', tuple(range(811, 827))),
|
('fc-2.14', tuple(range(811, 827))),
|
||||||
('fc-2.15', tuple(range(827, 855)) + tuple(range(22400, 22407))),
|
('fc-2.15', tuple(range(827, 855)) + tuple(range(22400, 22407))),
|
||||||
('dev', tuple(range(855, 894)))
|
('dev', tuple(range(855, 895)))
|
||||||
)
|
)
|
||||||
|
|
||||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||||
|
|
|
@ -335,7 +335,7 @@ class ThreeShufflesAndADraw(LaBelleLucie):
|
||||||
RowStack_Class = StackWrapper(
|
RowStack_Class = StackWrapper(
|
||||||
ThreeShufflesAndADraw_RowStack, base_rank=NO_RANK)
|
ThreeShufflesAndADraw_RowStack, base_rank=NO_RANK)
|
||||||
|
|
||||||
def createGame(self):
|
def createGame(self, texts=True):
|
||||||
lay = LaBelleLucie.createGame(self)
|
lay = LaBelleLucie.createGame(self)
|
||||||
s = self.s
|
s = self.s
|
||||||
# add a reserve stack
|
# add a reserve stack
|
||||||
|
@ -361,6 +361,35 @@ class ThreeShufflesAndADraw(LaBelleLucie):
|
||||||
p.dump(self.draw_done)
|
p.dump(self.draw_done)
|
||||||
|
|
||||||
|
|
||||||
|
# ************************************************************************
|
||||||
|
# * Cromwell
|
||||||
|
# ************************************************************************
|
||||||
|
|
||||||
|
class Cromwell(ThreeShufflesAndADraw):
|
||||||
|
Foundation_Classes = [SS_FoundationStack, SS_FoundationStack]
|
||||||
|
Talon_Class = InitialDealTalonStack
|
||||||
|
RowStack_Class = StackWrapper(
|
||||||
|
ThreeShufflesAndADraw_RowStack, base_rank=NO_RANK, max_move=999999)
|
||||||
|
|
||||||
|
def createGame(self, texts=True):
|
||||||
|
lay = Fan.createGame(self, rows=(6, 6, 6, 6, 2))
|
||||||
|
s = self.s
|
||||||
|
# add a reserve stack
|
||||||
|
x, y = s.rows[3].x, s.rows[-1].y
|
||||||
|
s.reserves.append(ThreeShufflesAndADraw_ReserveStack(x, y, self))
|
||||||
|
# redefine the stack-groups
|
||||||
|
lay.defaultStackGroups()
|
||||||
|
# extra settings
|
||||||
|
self.draw_done = 0
|
||||||
|
|
||||||
|
def startGame(self):
|
||||||
|
self.draw_done = 0
|
||||||
|
self.s.reserves[0].updateText()
|
||||||
|
for i in range(3):
|
||||||
|
self.s.talon.dealRow(rows=self.s.rows[:26], frames=0)
|
||||||
|
self._startAndDealRow()
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Trefoil
|
# * Trefoil
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
@ -1141,3 +1170,5 @@ registerGame(GameInfo(871, CeilingFan, "Ceiling Fan",
|
||||||
GI.GT_FAN_TYPE | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL))
|
GI.GT_FAN_TYPE | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL))
|
||||||
registerGame(GameInfo(879, RoamingProils, "Roaming Proils",
|
registerGame(GameInfo(879, RoamingProils, "Roaming Proils",
|
||||||
GI.GT_FAN_TYPE, 1, 0, GI.SL_BALANCED))
|
GI.GT_FAN_TYPE, 1, 0, GI.SL_BALANCED))
|
||||||
|
registerGame(GameInfo(894, Cromwell, "Cromwell",
|
||||||
|
GI.GT_FAN_TYPE | GI.GT_OPEN, 2, 0, GI.SL_MOSTLY_SKILL))
|
||||||
|
|
Loading…
Add table
Reference in a new issue