mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added Preference game.
This commit is contained in:
parent
d591db1e1c
commit
11ee25afc2
3 changed files with 32 additions and 5 deletions
12
html-src/rules/preference.html
Normal file
12
html-src/rules/preference.html
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<h1>Preference</h1>
|
||||||
|
<p>
|
||||||
|
Forty Thieves type. 1 deck. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the foundations.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="fortunesfavor.html">Fortune's Favor</a>,
|
||||||
|
but with only eight tableau piles.
|
|
@ -558,7 +558,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, 895)))
|
('dev', tuple(range(855, 896)))
|
||||||
)
|
)
|
||||||
|
|
||||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||||
|
|
|
@ -686,15 +686,19 @@ class Octave(Game):
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
|
||||||
class FortunesFavor(Game):
|
class FortunesFavor(Game):
|
||||||
|
ROWS = 2
|
||||||
|
COLS = 6
|
||||||
|
|
||||||
def createGame(self):
|
def createGame(self):
|
||||||
|
|
||||||
l, s = Layout(self), self.s
|
l, s = Layout(self), self.s
|
||||||
|
|
||||||
w, h = l.XM+8*l.XS, 2*l.YM+3*l.YS
|
w, h = l.XM + (2 + self.COLS) * l.XS, 2 * l.YM + (1 + self.ROWS) * l.YS
|
||||||
self.setSize(w, h)
|
self.setSize(w, h)
|
||||||
|
|
||||||
x, y = l.XM+3*l.XS, l.YM
|
offset = 2 + ((self.COLS - 4) / 2)
|
||||||
|
|
||||||
|
x, y = l.XM + offset * l.XS, l.YM
|
||||||
for i in range(4):
|
for i in range(4):
|
||||||
s.foundations.append(SS_FoundationStack(x, y, self, suit=i))
|
s.foundations.append(SS_FoundationStack(x, y, self, suit=i))
|
||||||
x += l.XS
|
x += l.XS
|
||||||
|
@ -705,9 +709,9 @@ class FortunesFavor(Game):
|
||||||
s.waste = WasteStack(x, y, self)
|
s.waste = WasteStack(x, y, self)
|
||||||
l.createText(s.waste, 'se')
|
l.createText(s.waste, 'se')
|
||||||
y = 2*l.YM+l.YS
|
y = 2*l.YM+l.YS
|
||||||
for i in range(2):
|
for i in range(self.ROWS):
|
||||||
x = l.XM+2*l.XS
|
x = l.XM+2*l.XS
|
||||||
for j in range(6):
|
for j in range(self.COLS):
|
||||||
stack = SS_RowStack(x, y, self, max_move=1)
|
stack = SS_RowStack(x, y, self, max_move=1)
|
||||||
stack.CARD_XOFFSET, stack.CARD_YOFFSET = 0, 0
|
stack.CARD_XOFFSET, stack.CARD_YOFFSET = 0, 0
|
||||||
s.rows.append(stack)
|
s.rows.append(stack)
|
||||||
|
@ -735,6 +739,15 @@ class FortunesFavor(Game):
|
||||||
shallHighlightMatch = Game._shallHighlightMatch_SS
|
shallHighlightMatch = Game._shallHighlightMatch_SS
|
||||||
|
|
||||||
|
|
||||||
|
# ************************************************************************
|
||||||
|
# * Preference
|
||||||
|
# ************************************************************************
|
||||||
|
|
||||||
|
class Preference(FortunesFavor):
|
||||||
|
ROWS = 2
|
||||||
|
COLS = 4
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Octagon
|
# * Octagon
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
@ -1526,3 +1539,5 @@ registerGame(GameInfo(848, Malmaison, "Malmaison",
|
||||||
GI.GT_FORTY_THIEVES, 4, 0, GI.SL_MOSTLY_SKILL))
|
GI.GT_FORTY_THIEVES, 4, 0, GI.SL_MOSTLY_SKILL))
|
||||||
registerGame(GameInfo(884, JacksInTheBox, "Jacks in the Box",
|
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",
|
||||||
|
GI.GT_FORTY_THIEVES, 1, 0, GI.SL_LUCK))
|
||||||
|
|
Loading…
Add table
Reference in a new issue