mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Improved organization of relaxed variants.
This commit is contained in:
parent
412e3b43a7
commit
28c77b8a83
7 changed files with 65 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
<h1>Westcliff</h1>
|
<h1>Relaxed Accordion</h1>
|
||||||
<p>
|
<p>
|
||||||
One deck type. 1 deck. No redeal.
|
One deck type. 1 deck. No redeal.
|
||||||
|
|
||||||
|
|
14
html-src/rules/relaxedpileon.html
Normal file
14
html-src/rules/relaxedpileon.html
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<h1>Relaxed PileOn</h1>
|
||||||
|
<p>
|
||||||
|
One-Deck game type. 1 deck. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Rearrange the cards so that each pile contains four cards with the
|
||||||
|
same rank.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="pileon.html">PileOn</a>,
|
||||||
|
but with a single reserve cell added - a single card can
|
||||||
|
be moved to or from this reserve at any time.
|
14
html-src/rules/relaxedthreefirtrees.html
Normal file
14
html-src/rules/relaxedthreefirtrees.html
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<h1>Relaxed Three Fir-trees</h1>
|
||||||
|
<p>
|
||||||
|
Golf type. 2 decks. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the waste stack.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="threefirtrees.html">Three fir-trees</a>,
|
||||||
|
but sequences do wrap around,
|
||||||
|
i.e. Twos and Kings may be placed on Aces
|
||||||
|
and Queens and Aces may be placed on Kings.
|
14
html-src/rules/threefirtrees.html
Normal file
14
html-src/rules/threefirtrees.html
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<h1>Three Fir-trees</h1>
|
||||||
|
<p>
|
||||||
|
Golf type. 2 decks. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the waste stack.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="golf.html">Golf</a>,
|
||||||
|
but with a different layout. Cards from the fir-trees
|
||||||
|
can only be moved to the waste if all their covered cards
|
||||||
|
are gone.
|
|
@ -1266,7 +1266,7 @@ registerGame(GameInfo(764, Beacon, "Beacon",
|
||||||
GI.GT_1DECK_TYPE | GI.GT_ORIGINAL, 1, 0,
|
GI.GT_1DECK_TYPE | GI.GT_ORIGINAL, 1, 0,
|
||||||
GI.SL_MOSTLY_SKILL))
|
GI.SL_MOSTLY_SKILL))
|
||||||
registerGame(GameInfo(768, RelaxedThreeFirTrees, "Relaxed Three Fir-trees",
|
registerGame(GameInfo(768, RelaxedThreeFirTrees, "Relaxed Three Fir-trees",
|
||||||
GI.GT_GOLF, 2, 0, GI.SL_BALANCED))
|
GI.GT_GOLF | GI.GT_RELAXED, 2, 0, GI.SL_BALANCED))
|
||||||
registerGame(GameInfo(777, DoubleGolf, "Double Golf",
|
registerGame(GameInfo(777, DoubleGolf, "Double Golf",
|
||||||
GI.GT_GOLF, 2, 0, GI.SL_BALANCED))
|
GI.GT_GOLF, 2, 0, GI.SL_BALANCED))
|
||||||
registerGame(GameInfo(783, Uintah, "Uintah",
|
registerGame(GameInfo(783, Uintah, "Uintah",
|
||||||
|
|
|
@ -66,6 +66,7 @@ class PileOn(Game):
|
||||||
TWIDTH = 4
|
TWIDTH = 4
|
||||||
NSTACKS = 15
|
NSTACKS = 15
|
||||||
PLAYCARDS = 4
|
PLAYCARDS = 4
|
||||||
|
EXTRACELL = False
|
||||||
|
|
||||||
#
|
#
|
||||||
# game layout
|
# game layout
|
||||||
|
@ -80,12 +81,21 @@ class PileOn(Game):
|
||||||
# w = max(2*l.XS, l.XS+(self.PLAYCARDS-1)*l.XOFFSET+2*l.XM)
|
# w = max(2*l.XS, l.XS+(self.PLAYCARDS-1)*l.XOFFSET+2*l.XM)
|
||||||
w = l.XS+(self.PLAYCARDS-1)*l.XOFFSET+3*l.XOFFSET
|
w = l.XS+(self.PLAYCARDS-1)*l.XOFFSET+3*l.XOFFSET
|
||||||
twidth, theight = self.TWIDTH, int((self.NSTACKS-1)/self.TWIDTH+1)
|
twidth, theight = self.TWIDTH, int((self.NSTACKS-1)/self.TWIDTH+1)
|
||||||
self.setSize(l.XM+twidth*w, l.YM+theight*l.YS)
|
exw = 0
|
||||||
|
if self.EXTRACELL:
|
||||||
|
exw = l.XS + l.XM
|
||||||
|
self.setSize((l.XM + twidth * w) + exw, l.YM + theight * l.YS)
|
||||||
|
|
||||||
# create stacks
|
# create stacks
|
||||||
y = l.YM
|
y = l.YM
|
||||||
|
|
||||||
|
if self.EXTRACELL:
|
||||||
|
ex, ey = l.XM, ((l.YM + theight * l.YS) / 2) - (l.YS / 2)
|
||||||
|
s.reserves.append(ReserveStack(ex, ey, self))
|
||||||
for i in range(theight):
|
for i in range(theight):
|
||||||
x = l.XM
|
x = l.XM
|
||||||
|
if (self.EXTRACELL):
|
||||||
|
x += exw
|
||||||
for j in range(twidth):
|
for j in range(twidth):
|
||||||
if i*twidth+j >= self.NSTACKS:
|
if i*twidth+j >= self.NSTACKS:
|
||||||
break
|
break
|
||||||
|
@ -99,9 +109,9 @@ class PileOn(Game):
|
||||||
s.talon = InitialDealTalonStack(x, y, self)
|
s.talon = InitialDealTalonStack(x, y, self)
|
||||||
|
|
||||||
# define stack-groups
|
# define stack-groups
|
||||||
self.sg.openstacks = s.rows
|
self.sg.openstacks = s.rows + s.reserves
|
||||||
self.sg.talonstacks = [s.talon]
|
self.sg.talonstacks = [s.talon]
|
||||||
self.sg.dropstacks = s.rows
|
self.sg.dropstacks = s.rows + s.reserves
|
||||||
|
|
||||||
#
|
#
|
||||||
# game overrides
|
# game overrides
|
||||||
|
@ -130,6 +140,10 @@ class SmallPileOn(PileOn):
|
||||||
PLAYCARDS = 4
|
PLAYCARDS = 4
|
||||||
|
|
||||||
|
|
||||||
|
class RelaxedPileOn(PileOn):
|
||||||
|
EXTRACELL = True
|
||||||
|
|
||||||
|
|
||||||
# class PileOn2Decks(PileOn):
|
# class PileOn2Decks(PileOn):
|
||||||
# TWIDTH = 4
|
# TWIDTH = 4
|
||||||
# NSTACKS = 15
|
# NSTACKS = 15
|
||||||
|
@ -400,3 +414,6 @@ registerGame(GameInfo(740, Footling, "Footling",
|
||||||
registerGame(GameInfo(741, DoubleFootling, "Double Footling",
|
registerGame(GameInfo(741, DoubleFootling, "Double Footling",
|
||||||
GI.GT_FREECELL | GI.GT_OPEN | GI.GT_ORIGINAL, 2, 0,
|
GI.GT_FREECELL | GI.GT_OPEN | GI.GT_ORIGINAL, 2, 0,
|
||||||
GI.SL_MOSTLY_SKILL))
|
GI.SL_MOSTLY_SKILL))
|
||||||
|
registerGame(GameInfo(793, RelaxedPileOn, "Relaxed PileOn",
|
||||||
|
GI.GT_1DECK_TYPE | GI.GT_OPEN | GI.GT_RELAXED, 1, 0,
|
||||||
|
GI.SL_MOSTLY_SKILL))
|
||||||
|
|
|
@ -334,4 +334,4 @@ registerGame(GameInfo(772, Accordion2, "Accordion",
|
||||||
GI.GT_1DECK_TYPE, 1, 0, GI.SL_BALANCED,
|
GI.GT_1DECK_TYPE, 1, 0, GI.SL_BALANCED,
|
||||||
altnames=('Idle Year', 'Methuselah', 'Tower of Babel')))
|
altnames=('Idle Year', 'Methuselah', 'Tower of Babel')))
|
||||||
registerGame(GameInfo(773, RelaxedAccordion, "Relaxed Accordion",
|
registerGame(GameInfo(773, RelaxedAccordion, "Relaxed Accordion",
|
||||||
GI.GT_1DECK_TYPE, 1, 0, GI.SL_BALANCED))
|
GI.GT_1DECK_TYPE | GI.GT_RELAXED, 1, 0, GI.SL_BALANCED))
|
||||||
|
|
Loading…
Add table
Reference in a new issue