1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Added Old Fashioned game.

This commit is contained in:
Joe R 2022-11-17 20:16:35 -05:00
parent 1ec22ad16f
commit 21c7eaf660
3 changed files with 26 additions and 4 deletions

View file

@ -0,0 +1,12 @@
<h1>Old Fashioned</h1>
<p>
Numerica type. 1 deck. No redeal.
<h3>Quick Description</h3>
<p>
Just like <a href="auldlangsyne.html">Auld Lang Syne</a>,
but with six tableau piles.
<h3>Notes</h3>
<p>
<i>Autodrop</i> is disabled for this game.

View file

@ -546,7 +546,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, 866)))
('dev', tuple(range(855, 867)))
)
# deprecated - the correct way is to or a GI.GT_XXX flag

View file

@ -52,15 +52,16 @@ class TamOShanter(Game):
Foundation_Class = RK_FoundationStack
RowStack_Class = StackWrapper(BasicRowStack, max_move=1, max_accept=0)
def createGame(self, rows=4, texts=False, yoffset=None):
def createGame(self, rows=4, playcards=12, texts=False, yoffset=None):
# create layout
l, s = Layout(self), self.s
# set window
if yoffset is None:
yoffset = l.YOFFSET
max_rows = max(rows, 4*self.gameinfo.decks)
self.setSize(l.XM+(2+max_rows)*l.XS, l.YM+2*l.YS+12*yoffset)
max_rows = max(rows, 4 * self.gameinfo.decks)
self.setSize(l.XM + (2 + max_rows) * l.XS,
l.YM + 2 * l.YS + playcards * yoffset)
# create stacks
if texts:
@ -99,6 +100,7 @@ class TamOShanter(Game):
# ************************************************************************
# * Auld Lang Syne
# * Old Fashioned
# ************************************************************************
class AuldLangSyne(TamOShanter):
@ -111,6 +113,12 @@ class AuldLangSyne(TamOShanter):
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
self._startAndDealRow()
class OldFashioned(AuldLangSyne):
def createGame(self):
TamOShanter.createGame(self, rows=6, playcards=8)
# ************************************************************************
# * Strategy
# * Strategy +
@ -678,3 +686,5 @@ registerGame(GameInfo(702, DoubleLine, "Double Line",
GI.GT_NUMERICA, 2, 0, GI.SL_BALANCED))
registerGame(GameInfo(853, Grandfather, "Grandfather",
GI.GT_NUMERICA, 2, 1, GI.SL_BALANCED))
registerGame(GameInfo(866, OldFashioned, "Old Fashioned",
GI.GT_NUMERICA, 1, 0, GI.SL_LUCK))