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:
parent
1ec22ad16f
commit
21c7eaf660
3 changed files with 26 additions and 4 deletions
12
html-src/rules/oldfashioned.html
Normal file
12
html-src/rules/oldfashioned.html
Normal 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.
|
|
@ -546,7 +546,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, 866)))
|
('dev', tuple(range(855, 867)))
|
||||||
)
|
)
|
||||||
|
|
||||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||||
|
|
|
@ -52,7 +52,7 @@ class TamOShanter(Game):
|
||||||
Foundation_Class = RK_FoundationStack
|
Foundation_Class = RK_FoundationStack
|
||||||
RowStack_Class = StackWrapper(BasicRowStack, max_move=1, max_accept=0)
|
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
|
# create layout
|
||||||
l, s = Layout(self), self.s
|
l, s = Layout(self), self.s
|
||||||
|
|
||||||
|
@ -60,7 +60,8 @@ class TamOShanter(Game):
|
||||||
if yoffset is None:
|
if yoffset is None:
|
||||||
yoffset = l.YOFFSET
|
yoffset = l.YOFFSET
|
||||||
max_rows = max(rows, 4 * self.gameinfo.decks)
|
max_rows = max(rows, 4 * self.gameinfo.decks)
|
||||||
self.setSize(l.XM+(2+max_rows)*l.XS, l.YM+2*l.YS+12*yoffset)
|
self.setSize(l.XM + (2 + max_rows) * l.XS,
|
||||||
|
l.YM + 2 * l.YS + playcards * yoffset)
|
||||||
|
|
||||||
# create stacks
|
# create stacks
|
||||||
if texts:
|
if texts:
|
||||||
|
@ -99,6 +100,7 @@ class TamOShanter(Game):
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Auld Lang Syne
|
# * Auld Lang Syne
|
||||||
|
# * Old Fashioned
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
|
||||||
class AuldLangSyne(TamOShanter):
|
class AuldLangSyne(TamOShanter):
|
||||||
|
@ -111,6 +113,12 @@ class AuldLangSyne(TamOShanter):
|
||||||
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
|
self.s.talon.dealRow(rows=self.s.foundations, frames=0)
|
||||||
self._startAndDealRow()
|
self._startAndDealRow()
|
||||||
|
|
||||||
|
|
||||||
|
class OldFashioned(AuldLangSyne):
|
||||||
|
def createGame(self):
|
||||||
|
TamOShanter.createGame(self, rows=6, playcards=8)
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Strategy
|
# * Strategy
|
||||||
# * Strategy +
|
# * Strategy +
|
||||||
|
@ -678,3 +686,5 @@ registerGame(GameInfo(702, DoubleLine, "Double Line",
|
||||||
GI.GT_NUMERICA, 2, 0, GI.SL_BALANCED))
|
GI.GT_NUMERICA, 2, 0, GI.SL_BALANCED))
|
||||||
registerGame(GameInfo(853, Grandfather, "Grandfather",
|
registerGame(GameInfo(853, Grandfather, "Grandfather",
|
||||||
GI.GT_NUMERICA, 2, 1, GI.SL_BALANCED))
|
GI.GT_NUMERICA, 2, 1, GI.SL_BALANCED))
|
||||||
|
registerGame(GameInfo(866, OldFashioned, "Old Fashioned",
|
||||||
|
GI.GT_NUMERICA, 1, 0, GI.SL_LUCK))
|
||||||
|
|
Loading…
Add table
Reference in a new issue