mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added Napoleon's Shoulder game.
This commit is contained in:
parent
7499599ba3
commit
29f737c633
4 changed files with 33 additions and 2 deletions
14
html-src/rules/napoleonsshoulder.html
Normal file
14
html-src/rules/napoleonsshoulder.html
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<h1>Napoleon's Shoulder</h1>
|
||||||
|
<p>
|
||||||
|
Forty Thieves type. 2 decks. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the foundations.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="fortythieves.html">Forty Thieves</a>,
|
||||||
|
but with twelve piles, tableau piles are built down regardless
|
||||||
|
of suit, and empty tableau piles can only be filled with a
|
||||||
|
card from the waste.
|
|
@ -1,6 +1,6 @@
|
||||||
<h1>Napoleon's Square</h1>
|
<h1>Napoleon's Square</h1>
|
||||||
<p>
|
<p>
|
||||||
Forty Thieves type. 2 decks. 1 redeal.
|
Forty Thieves type. 2 decks. No redeal.
|
||||||
|
|
||||||
<h3>Object</h3>
|
<h3>Object</h3>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -566,7 +566,7 @@ class GI:
|
||||||
('fc-2.20', tuple(range(855, 897))),
|
('fc-2.20', tuple(range(855, 897))),
|
||||||
('fc-2.21', tuple(range(897, 900)) + tuple(range(11014, 11017)) +
|
('fc-2.21', tuple(range(897, 900)) + tuple(range(11014, 11017)) +
|
||||||
tuple(range(13160, 13163)) + (16682,)),
|
tuple(range(13160, 13163)) + (16682,)),
|
||||||
('dev', tuple(range(906, 910)) + tuple(range(11017, 11020))),
|
('dev', tuple(range(906, 911)) + tuple(range(11017, 11020))),
|
||||||
)
|
)
|
||||||
|
|
||||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||||
|
|
|
@ -157,6 +157,7 @@ class FortyThieves(Game):
|
||||||
# * Waning Moon
|
# * Waning Moon
|
||||||
# * Lucas
|
# * Lucas
|
||||||
# * Napoleon's Square
|
# * Napoleon's Square
|
||||||
|
# * Napoleon's Shoulder
|
||||||
# * Carre Napoleon
|
# * Carre Napoleon
|
||||||
# * Josephine
|
# * Josephine
|
||||||
# * Marie Rose
|
# * Marie Rose
|
||||||
|
@ -201,6 +202,20 @@ class NapoleonsSquare(FortyThieves):
|
||||||
FortyThieves.createGame(self, rows=12)
|
FortyThieves.createGame(self, rows=12)
|
||||||
|
|
||||||
|
|
||||||
|
class NapoleonsShoulder_RowStack(RK_RowStack):
|
||||||
|
def acceptsCards(self, from_stack, cards):
|
||||||
|
if from_stack is not self.game.s.waste and len(self.cards) == 0:
|
||||||
|
return False
|
||||||
|
return RK_RowStack.acceptsCards(self, from_stack, cards)
|
||||||
|
|
||||||
|
|
||||||
|
class NapoleonsShoulder(FortyThieves):
|
||||||
|
RowStack_Class = NapoleonsShoulder_RowStack
|
||||||
|
|
||||||
|
def createGame(self):
|
||||||
|
FortyThieves.createGame(self, rows=12)
|
||||||
|
|
||||||
|
|
||||||
class CarreNapoleon(FortyThieves):
|
class CarreNapoleon(FortyThieves):
|
||||||
RowStack_Class = StackWrapper(SS_RowStack, base_rank=KING)
|
RowStack_Class = StackWrapper(SS_RowStack, base_rank=KING)
|
||||||
|
|
||||||
|
@ -1543,3 +1558,5 @@ registerGame(GameInfo(884, JacksInTheBox, "Jacks in the Box",
|
||||||
GI.GT_FORTY_THIEVES, 2, 0, GI.SL_MOSTLY_SKILL))
|
GI.GT_FORTY_THIEVES, 2, 0, GI.SL_MOSTLY_SKILL))
|
||||||
registerGame(GameInfo(895, Preference, "Preference",
|
registerGame(GameInfo(895, Preference, "Preference",
|
||||||
GI.GT_FORTY_THIEVES, 1, 0, GI.SL_LUCK))
|
GI.GT_FORTY_THIEVES, 1, 0, GI.SL_LUCK))
|
||||||
|
registerGame(GameInfo(910, NapoleonsShoulder, "Napoleon's Shoulder",
|
||||||
|
GI.GT_FORTY_THIEVES, 2, 0, GI.SL_BALANCED))
|
||||||
|
|
Loading…
Add table
Reference in a new issue