mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added Housefly game.
This commit is contained in:
parent
3a37c1157d
commit
4dcf1f2da6
3 changed files with 25 additions and 5 deletions
11
html-src/rules/housefly.html
Normal file
11
html-src/rules/housefly.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<h1>Housefly</h1>
|
||||||
|
<p>
|
||||||
|
Numerica type. 1 deck. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the foundations.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="gnat.html">Gnat</a>, but with six tableau piles.
|
|
@ -559,7 +559,7 @@ class GI:
|
||||||
('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))),
|
||||||
('fc-2.20', tuple(range(855, 897))),
|
('fc-2.20', tuple(range(855, 897))),
|
||||||
('dev', tuple(range(897, 899)) + tuple(range(13160, 13163)) + (16682,))
|
('dev', tuple(range(897, 900)) + tuple(range(13160, 13163)) + (16682,))
|
||||||
)
|
)
|
||||||
|
|
||||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||||
|
|
|
@ -422,18 +422,20 @@ class Fanny(Frog):
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Gnat
|
# * Gnat
|
||||||
|
# * Housefly
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
|
||||||
class Gnat(Game):
|
class Gnat(Game):
|
||||||
|
|
||||||
Hint_Class = Numerica_Hint
|
Hint_Class = Numerica_Hint
|
||||||
|
|
||||||
def createGame(self):
|
def createGame(self, rows=4):
|
||||||
# create layout
|
# create layout
|
||||||
l, s = Layout(self), self.s
|
l, s = Layout(self), self.s
|
||||||
|
|
||||||
# set window
|
# set window
|
||||||
self.setSize(l.XM + 8*l.XS, l.YM + 2*l.YS+16*l.YOFFSET)
|
self.setSize(l.XM + (4 + rows) * l.XS,
|
||||||
|
l.YM + 2 * l.YS + 16 * l.YOFFSET)
|
||||||
|
|
||||||
# create stacks
|
# create stacks
|
||||||
x, y = l.XM, l.YM
|
x, y = l.XM, l.YM
|
||||||
|
@ -447,11 +449,11 @@ class Gnat(Game):
|
||||||
x += l.XS
|
x += l.XS
|
||||||
|
|
||||||
x, y = l.XM+2*l.XS, l.YM+l.YS
|
x, y = l.XM+2*l.XS, l.YM+l.YS
|
||||||
for i in range(4):
|
for i in range(rows):
|
||||||
s.rows.append(
|
s.rows.append(
|
||||||
Numerica_RowStack(x, y, self, max_accept=UNLIMITED_ACCEPTS))
|
Numerica_RowStack(x, y, self, max_accept=UNLIMITED_ACCEPTS))
|
||||||
x += l.XS
|
x += l.XS
|
||||||
x = l.XM+6*l.XS
|
x = l.XM + (2 + rows) * l.XS
|
||||||
for i in range(2):
|
for i in range(2):
|
||||||
y = l.YM + l.YS//2
|
y = l.YM + l.YS//2
|
||||||
for j in range(3):
|
for j in range(3):
|
||||||
|
@ -473,6 +475,11 @@ class Gnat(Game):
|
||||||
self.s.talon.dealCards()
|
self.s.talon.dealCards()
|
||||||
|
|
||||||
|
|
||||||
|
class Housefly(Gnat):
|
||||||
|
def createGame(self):
|
||||||
|
Gnat.createGame(self, rows=6)
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Gloaming
|
# * Gloaming
|
||||||
# * Chamberlain
|
# * Chamberlain
|
||||||
|
@ -1241,3 +1248,5 @@ registerGame(GameInfo(760, Aglet, "Aglet",
|
||||||
GI.SL_MOSTLY_SKILL))
|
GI.SL_MOSTLY_SKILL))
|
||||||
registerGame(GameInfo(836, Ladybug, "Ladybug",
|
registerGame(GameInfo(836, Ladybug, "Ladybug",
|
||||||
GI.GT_1DECK_TYPE, 1, -2, GI.SL_BALANCED))
|
GI.GT_1DECK_TYPE, 1, -2, GI.SL_BALANCED))
|
||||||
|
registerGame(GameInfo(899, Housefly, "Housefly",
|
||||||
|
GI.GT_NUMERICA, 1, 0, GI.SL_BALANCED))
|
||||||
|
|
Loading…
Add table
Reference in a new issue