mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added Single Spark game.
This commit is contained in:
parent
99bc75f4c1
commit
5ed1236ab5
4 changed files with 46 additions and 4 deletions
12
html-src/rules/singlespark.html
Normal file
12
html-src/rules/singlespark.html
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<h1>Single Spark</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="thespark.html">The Spark</a>,
|
||||||
|
but with only one deck and eight tableau piles.
|
21
html-src/rules/thespark.html
Normal file
21
html-src/rules/thespark.html
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<h1>The Spark</h1>
|
||||||
|
<p>
|
||||||
|
Forty Thieves type. 2 decks. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the foundations.
|
||||||
|
|
||||||
|
<h3>Rules</h3>
|
||||||
|
<p>
|
||||||
|
Twelve cards are dealt into twelve tableau piles. These
|
||||||
|
piles are built down by suit. Only one card can be moved
|
||||||
|
at a time. Any card can be used to fill empty piles in the
|
||||||
|
tableau. The kings are dealt to eight foundation piles,
|
||||||
|
which are built up by same suit, wrapping from king to ace
|
||||||
|
as necessary.
|
||||||
|
<p>
|
||||||
|
Cards from the talon are dealt to two waste piles, three
|
||||||
|
cards at a time to each. The top card from either waste pile
|
||||||
|
can be moved to a tableau or foundation pile. The game is won
|
||||||
|
if all the cards are moved to the foundation piles.
|
|
@ -485,7 +485,7 @@ class GI:
|
||||||
('fc-2.12', tuple(range(774, 811)) + (16681,) +
|
('fc-2.12', tuple(range(774, 811)) + (16681,) +
|
||||||
tuple(range(22217, 22219))),
|
tuple(range(22217, 22219))),
|
||||||
('fc-2.14', tuple(range(811, 827))),
|
('fc-2.14', tuple(range(811, 827))),
|
||||||
('fc-2.16', tuple(range(827, 837)))
|
('fc-2.16', tuple(range(827, 838)))
|
||||||
)
|
)
|
||||||
|
|
||||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||||
|
|
|
@ -905,6 +905,7 @@ class Crossroads(Junction):
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * The Spark
|
# * The Spark
|
||||||
|
# * Single Spark
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
|
||||||
class TheSpark_Talon(TalonStack):
|
class TheSpark_Talon(TalonStack):
|
||||||
|
@ -932,15 +933,17 @@ class TheSpark_Talon(TalonStack):
|
||||||
class TheSpark(Game):
|
class TheSpark(Game):
|
||||||
Hint_Class = CautiousDefaultHint
|
Hint_Class = CautiousDefaultHint
|
||||||
|
|
||||||
|
PER_ROW = 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, l.YM+4*l.YS
|
w, h = l.XM + (self.PER_ROW + 2) * l.XS, l.YM + 4 * l.YS
|
||||||
self.setSize(w, h)
|
self.setSize(w, h)
|
||||||
|
|
||||||
x, y = l.XM, l.YM
|
x, y = l.XM, l.YM
|
||||||
for i in range(8):
|
for i in range(self.gameinfo.decks * 4):
|
||||||
s.foundations.append(SS_FoundationStack(x, y, self,
|
s.foundations.append(SS_FoundationStack(x, y, self,
|
||||||
suit=i//2, base_rank=KING, mod=13))
|
suit=i//2, base_rank=KING, mod=13))
|
||||||
x += l.XS
|
x += l.XS
|
||||||
|
@ -956,7 +959,7 @@ class TheSpark(Game):
|
||||||
y = l.YM+l.YS*3//2
|
y = l.YM+l.YS*3//2
|
||||||
for i in range(2):
|
for i in range(2):
|
||||||
x = l.XM+2*l.XS
|
x = l.XM+2*l.XS
|
||||||
for j in range(6):
|
for j in range(self.PER_ROW):
|
||||||
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)
|
||||||
|
@ -977,6 +980,10 @@ class TheSpark(Game):
|
||||||
shallHighlightMatch = Game._shallHighlightMatch_SS
|
shallHighlightMatch = Game._shallHighlightMatch_SS
|
||||||
|
|
||||||
|
|
||||||
|
class SingleSpark(TheSpark):
|
||||||
|
PER_ROW = 4
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Double Gold Mine
|
# * Double Gold Mine
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
@ -1420,3 +1427,5 @@ registerGame(GameInfo(815, Following, "Following",
|
||||||
GI.GT_FORTY_THIEVES, 1, 1, GI.SL_BALANCED))
|
GI.GT_FORTY_THIEVES, 1, 1, GI.SL_BALANCED))
|
||||||
registerGame(GameInfo(818, TripleRail, "Triple Rail",
|
registerGame(GameInfo(818, TripleRail, "Triple Rail",
|
||||||
GI.GT_FORTY_THIEVES, 3, 0, GI.SL_BALANCED))
|
GI.GT_FORTY_THIEVES, 3, 0, GI.SL_BALANCED))
|
||||||
|
registerGame(GameInfo(837, SingleSpark, "Single Spark",
|
||||||
|
GI.GT_FORTY_THIEVES, 1, 0, GI.SL_MOSTLY_LUCK))
|
||||||
|
|
Loading…
Add table
Reference in a new issue