1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Added 8 foundation variation of Take Away/Eliminator.

This commit is contained in:
Joe R 2021-05-01 22:52:19 -04:00
parent 9a7bc59c8b
commit 86ee7c9767
3 changed files with 48 additions and 3 deletions
html-src/rules
pysollib/games

View file

@ -0,0 +1,20 @@
<h1>Take Away</h1>
<p>
One-Deck game type. 1 deck. No redeal.
<h3>Object</h3>
<p>
Move all of the cards to the foundations.
<h3>Rules</h3>
<p>
The cards are dealt into four tableau stacks of 13 face-up cards each.
Cards may be moved to one of the six foundations one at a time. Any
card may be used to start one of the foundations, but after that, the
foundations are built in sequence up or down in rank. Turning the
corner is allowed, so aces may be played on kings, and vice versa.
<p>
You may not move cards between tableau stacks.
<p>
You win if you get all the cards to the foundations.

View file

@ -0,0 +1,12 @@
<h1>Take Away 8</h1>
<p>
One-Deck game type. 1 deck. No redeal.
<h3>Object</h3>
<p>
Move all of the cards to the foundations.
<h3>Quick Description</h3>
<p>
Like <a href="takeaway.html">Take Away</a>,
but with eight foundations.

View file

@ -72,7 +72,7 @@ class TakeAway(Game):
l, s = Layout(self), self.s
# set window
w, h = 2*l.XM+10*l.XS, l.YM+l.YS+16*l.YOFFSET
w, h = 2 * l.XM + (4 + reserves) * l.XS, l.YM + l.YS + 16 * l.YOFFSET
self.setSize(w, h)
# create stacks
@ -82,7 +82,7 @@ class TakeAway(Game):
max_move=1, max_accept=0))
x += l.XS
x += l.XM
for i in range(6):
for i in range(reserves):
stack = self.Foundation_Class(x, y, self, suit=ANY_SUIT,
base_rank=ANY_RANK)
stack.CARD_XOFFSET, stack.CARD_YOFFSET = 0, l.YOFFSET
@ -230,10 +230,23 @@ class Striptease(TakeAway):
return ((r1+1) % 13 == r2 or (r2+1) % 13 == r1)
# ************************************************************************
# * Take Away 8
# ************************************************************************
class TakeAway8(TakeAway):
def createGame(self):
TakeAway.createGame(self, reserves=8)
# register the game
registerGame(GameInfo(334, TakeAway, "Take Away",
GI.GT_1DECK_TYPE | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL))
GI.GT_1DECK_TYPE | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL,
altnames=("Eliminator")))
registerGame(GameInfo(335, FourStacks, "Four Stacks",
GI.GT_1DECK_TYPE | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL))
registerGame(GameInfo(654, Striptease, "Striptease",
GI.GT_1DECK_TYPE, 1, 0, GI.SL_MOSTLY_SKILL))
registerGame(GameInfo(784, TakeAway8, "Take Away 8",
GI.GT_1DECK_TYPE | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL))