mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added short deck Montana variants.
This commit is contained in:
parent
28c77b8a83
commit
3d9d074cae
4 changed files with 60 additions and 6 deletions
13
html-src/rules/houseofcommons.html
Normal file
13
html-src/rules/houseofcommons.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<h1>House of Commons</h1>
|
||||||
|
<p>
|
||||||
|
Montana type. 1 stripped deck. 1 redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Group all the cards in sets of 9 cards in acscending sequence
|
||||||
|
by suit from Two to Ten.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="montana.html">Montana</a>, but only played
|
||||||
|
with cards from two to ten, and only one redeal is allowed.
|
13
html-src/rules/pretzel.html
Normal file
13
html-src/rules/pretzel.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<h1>Pretzel</h1>
|
||||||
|
<p>
|
||||||
|
Montana type. 1 stripped deck. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Group all the cards in sets of 4 cards in acscending sequence
|
||||||
|
by suit from Two to Five.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="montana.html">Montana</a>, but only played
|
||||||
|
with cards from two to five, and no redeal is allowed.
|
|
@ -1,6 +1,6 @@
|
||||||
<h1>Spoilt</h1>
|
<h1>Spoilt</h1>
|
||||||
<p>
|
<p>
|
||||||
Montana type. 1 deck. No redeals.
|
Montana type. 1 stripped deck. No redeal.
|
||||||
|
|
||||||
<h3>Object</h3>
|
<h3>Object</h3>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -207,12 +207,13 @@ class Montana(Game):
|
||||||
|
|
||||||
def startGame(self):
|
def startGame(self):
|
||||||
frames = 0
|
frames = 0
|
||||||
for i in range(52):
|
toprows = len(self.s.talon.cards) * .75
|
||||||
|
for i in range(len(self.s.talon.cards)):
|
||||||
c = self.s.talon.cards[-1]
|
c = self.s.talon.cards[-1]
|
||||||
if c.rank == ACE:
|
if c.rank == ACE:
|
||||||
self.s.talon.dealRow(rows=self.s.internals, frames=0)
|
self.s.talon.dealRow(rows=self.s.internals, frames=0)
|
||||||
else:
|
else:
|
||||||
if frames == 0 and i >= 39:
|
if frames == 0 and i >= toprows:
|
||||||
self.startDealSample()
|
self.startDealSample()
|
||||||
frames = 4
|
frames = 4
|
||||||
self.s.talon.dealRow(rows=(self.s.rows[i],), frames=frames)
|
self.s.talon.dealRow(rows=(self.s.rows[i],), frames=frames)
|
||||||
|
@ -624,13 +625,35 @@ class DoubleRedMoon(DoubleMontana, RedMoon):
|
||||||
startGame = RedMoon.startGame
|
startGame = RedMoon.startGame
|
||||||
|
|
||||||
|
|
||||||
|
# ************************************************************************
|
||||||
|
# * House of Commons
|
||||||
|
# * Pretzel
|
||||||
|
# ************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
class HouseOfCommons(Montana):
|
||||||
|
Talon_Class = StackWrapper(Montana_Talon, max_rounds=2)
|
||||||
|
RLEN, RSTEP, RBASE = 40, 10, 1
|
||||||
|
|
||||||
|
def createGame(self):
|
||||||
|
Montana.createGame(self, round_text=True)
|
||||||
|
|
||||||
|
|
||||||
|
class Pretzel(Montana):
|
||||||
|
Talon_Class = InitialDealTalonStack
|
||||||
|
RLEN, RSTEP, RBASE = 20, 5, 1
|
||||||
|
|
||||||
|
def createGame(self):
|
||||||
|
Montana.createGame(self, round_text=False)
|
||||||
|
|
||||||
|
|
||||||
# register the game
|
# register the game
|
||||||
registerGame(GameInfo(53, Montana, "Montana",
|
registerGame(GameInfo(53, Montana, "Montana",
|
||||||
GI.GT_MONTANA | GI.GT_OPEN, 1, 2, GI.SL_MOSTLY_SKILL,
|
GI.GT_MONTANA | GI.GT_OPEN, 1, 2, GI.SL_MOSTLY_SKILL,
|
||||||
si={"ncards": 48}, altnames="Gaps"))
|
si={"ncards": 48}, altnames="Gaps"))
|
||||||
registerGame(GameInfo(116, Spaces, "Spaces",
|
registerGame(GameInfo(116, Spaces, "Spaces",
|
||||||
GI.GT_MONTANA | GI.GT_OPEN, 1, 2, GI.SL_MOSTLY_SKILL,
|
GI.GT_MONTANA | GI.GT_OPEN, 1, 2, GI.SL_MOSTLY_SKILL,
|
||||||
si={"ncards": 48}))
|
si={"ncards": 48}, altnames="Addiction"))
|
||||||
registerGame(GameInfo(63, BlueMoon, "Blue Moon",
|
registerGame(GameInfo(63, BlueMoon, "Blue Moon",
|
||||||
GI.GT_MONTANA | GI.GT_OPEN, 1, 2, GI.SL_MOSTLY_SKILL,
|
GI.GT_MONTANA | GI.GT_OPEN, 1, 2, GI.SL_MOSTLY_SKILL,
|
||||||
altnames=("Rangoon",)))
|
altnames=("Rangoon",)))
|
||||||
|
@ -653,11 +676,16 @@ registerGame(GameInfo(706, Paganini, "Paganini",
|
||||||
altnames=('Long Trip',)))
|
altnames=('Long Trip',)))
|
||||||
registerGame(GameInfo(736, Spoilt, "Spoilt",
|
registerGame(GameInfo(736, Spoilt, "Spoilt",
|
||||||
GI.GT_MONTANA, 1, 0, GI.SL_MOSTLY_LUCK,
|
GI.GT_MONTANA, 1, 0, GI.SL_MOSTLY_LUCK,
|
||||||
ranks=(0, 6, 7, 8, 9, 10, 11, 12),
|
ranks=(0, 6, 7, 8, 9, 10, 11, 12)))
|
||||||
))
|
|
||||||
registerGame(GameInfo(759, DoubleMontana, "Double Montana",
|
registerGame(GameInfo(759, DoubleMontana, "Double Montana",
|
||||||
GI.GT_MONTANA | GI.GT_OPEN, 2, 0, GI.SL_MOSTLY_SKILL))
|
GI.GT_MONTANA | GI.GT_OPEN, 2, 0, GI.SL_MOSTLY_SKILL))
|
||||||
registerGame(GameInfo(770, DoubleBlueMoon, "Double Blue Moon",
|
registerGame(GameInfo(770, DoubleBlueMoon, "Double Blue Moon",
|
||||||
GI.GT_MONTANA | GI.GT_OPEN, 2, 2, GI.SL_MOSTLY_SKILL))
|
GI.GT_MONTANA | GI.GT_OPEN, 2, 2, GI.SL_MOSTLY_SKILL))
|
||||||
registerGame(GameInfo(771, DoubleRedMoon, "Double Red Moon",
|
registerGame(GameInfo(771, DoubleRedMoon, "Double Red Moon",
|
||||||
GI.GT_MONTANA | GI.GT_OPEN, 2, 2, GI.SL_MOSTLY_SKILL))
|
GI.GT_MONTANA | GI.GT_OPEN, 2, 2, GI.SL_MOSTLY_SKILL))
|
||||||
|
registerGame(GameInfo(794, HouseOfCommons, "House of Commons",
|
||||||
|
GI.GT_MONTANA | GI.GT_OPEN, 1, 1, GI.SL_MOSTLY_SKILL,
|
||||||
|
ranks=(0, 1, 2, 3, 4, 5, 6, 7, 8, 9), si={"ncards": 36}))
|
||||||
|
registerGame(GameInfo(795, Pretzel, "Pretzel",
|
||||||
|
GI.GT_MONTANA | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL,
|
||||||
|
ranks=(0, 1, 2, 3, 4), si={"ncards": 16}))
|
||||||
|
|
Loading…
Add table
Reference in a new issue