mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added Agnes Two game.
This commit is contained in:
parent
fbb369d93b
commit
c87bd34832
3 changed files with 29 additions and 8 deletions
12
html-src/rules/agnestwo.html
Normal file
12
html-src/rules/agnestwo.html
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<h1>Agnes Two</h1>
|
||||||
|
<p>
|
||||||
|
Raglan type. 2 decks. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the foundations.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="agnesbernauer.html">Agnes Bernauer</a>, but
|
||||||
|
with two decks, ten play piles, and ten reserves.
|
|
@ -548,7 +548,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, 873)))
|
('dev', tuple(range(855, 874)))
|
||||||
)
|
)
|
||||||
|
|
||||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||||
|
|
|
@ -662,6 +662,7 @@ class QueenVictoria(KingAlbert):
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Jane
|
# * Jane
|
||||||
# * Agnes Bernauer
|
# * Agnes Bernauer
|
||||||
|
# * Agnes Two
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
|
||||||
class Jane_Talon(OpenTalonStack):
|
class Jane_Talon(OpenTalonStack):
|
||||||
|
@ -695,9 +696,10 @@ class Jane(Klondike):
|
||||||
def createGame(self, max_rounds=1, rows=7, reserves=7, playcards=16):
|
def createGame(self, max_rounds=1, rows=7, reserves=7, playcards=16):
|
||||||
lay, s = Layout(self), self.s
|
lay, s = Layout(self), self.s
|
||||||
maxrows = max(rows, 7)
|
maxrows = max(rows, 7)
|
||||||
w = lay.XM+maxrows*lay.XS+lay.XM+2*lay.XS
|
w = lay.XM + maxrows * lay.XS + lay.XM + 2 * lay.XS
|
||||||
h = max(lay.YM+2*lay.YS+playcards*lay.YOFFSET+lay.TEXT_HEIGHT,
|
h = max(lay.YM + 2 * lay.YS + playcards * lay.YOFFSET
|
||||||
lay.YM+4*lay.YS)
|
+ lay.TEXT_HEIGHT,
|
||||||
|
lay.YM + ((reserves + 1) / 2) * lay.YS)
|
||||||
self.setSize(w, h)
|
self.setSize(w, h)
|
||||||
|
|
||||||
x, y = lay.XM, lay.YM
|
x, y = lay.XM, lay.YM
|
||||||
|
@ -706,10 +708,11 @@ class Jane(Klondike):
|
||||||
x += lay.XS
|
x += lay.XS
|
||||||
s.waste = WasteStack(x, y, self)
|
s.waste = WasteStack(x, y, self)
|
||||||
|
|
||||||
x += 2*lay.XS
|
x += (rows - 1 - (4 * self.gameinfo.decks)) * lay.XS
|
||||||
for i in range(4):
|
for i in range(4):
|
||||||
s.foundations.append(self.Foundation_Class(x, y, self, suit=i))
|
for j in range(self.gameinfo.decks):
|
||||||
x += lay.XS
|
s.foundations.append(self.Foundation_Class(x, y, self, suit=i))
|
||||||
|
x += lay.XS
|
||||||
|
|
||||||
x, y = lay.XM, lay.YM+lay.YS+lay.TEXT_HEIGHT
|
x, y = lay.XM, lay.YM+lay.YS+lay.TEXT_HEIGHT
|
||||||
for i in range(rows):
|
for i in range(rows):
|
||||||
|
@ -763,6 +766,11 @@ class AgnesBernauer(Jane):
|
||||||
Jane.startGame(self, flip=1)
|
Jane.startGame(self, flip=1)
|
||||||
|
|
||||||
|
|
||||||
|
class AgnesTwo(AgnesBernauer):
|
||||||
|
def createGame(self):
|
||||||
|
Jane.createGame(self, rows=10, reserves=10, playcards=20)
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Senate
|
# * Senate
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
@ -770,7 +778,6 @@ class AgnesBernauer(Jane):
|
||||||
class Senate(Jane):
|
class Senate(Jane):
|
||||||
|
|
||||||
def createGame(self, rows=4):
|
def createGame(self, rows=4):
|
||||||
|
|
||||||
playcards = 10
|
playcards = 10
|
||||||
|
|
||||||
lay, s = Layout(self), self.s
|
lay, s = Layout(self), self.s
|
||||||
|
@ -1647,3 +1654,5 @@ registerGame(GameInfo(861, Wildflower, "Wildflower",
|
||||||
GI.GT_RAGLAN | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL))
|
GI.GT_RAGLAN | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL))
|
||||||
registerGame(GameInfo(869, Smokey, "Smokey",
|
registerGame(GameInfo(869, Smokey, "Smokey",
|
||||||
GI.GT_KLONDIKE, 1, 2, GI.SL_BALANCED))
|
GI.GT_KLONDIKE, 1, 2, GI.SL_BALANCED))
|
||||||
|
registerGame(GameInfo(873, AgnesTwo, "Agnes Two",
|
||||||
|
GI.GT_RAGLAN, 2, 0, GI.SL_BALANCED))
|
||||||
|
|
Loading…
Add table
Reference in a new issue