mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Fixed incorrect rules for The Spark type games (old version is renamed Kilowatt).
This commit is contained in:
parent
5ed1236ab5
commit
940a5d584e
4 changed files with 59 additions and 13 deletions
26
html-src/rules/kilowatt.html
Normal file
26
html-src/rules/kilowatt.html
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<h1>Inverse 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.
|
||||||
|
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<p>
|
||||||
|
Inverse Spark is an inverted variant of
|
||||||
|
<a href="thespark.html">The Spark</a>.
|
|
@ -9,11 +9,10 @@ Move all cards to the foundations.
|
||||||
<h3>Rules</h3>
|
<h3>Rules</h3>
|
||||||
<p>
|
<p>
|
||||||
Twelve cards are dealt into twelve tableau piles. These
|
Twelve cards are dealt into twelve tableau piles. These
|
||||||
piles are built down by suit. Only one card can be moved
|
piles are built up by suit. Only one card can be moved
|
||||||
at a time. Any card can be used to fill empty piles in the
|
at a time. Any card can be used to fill empty piles in the
|
||||||
tableau. The kings are dealt to eight foundation piles,
|
tableau. Eight foundation piles are built down by same suit,
|
||||||
which are built up by same suit, wrapping from king to ace
|
starting from the kings.
|
||||||
as necessary.
|
|
||||||
<p>
|
<p>
|
||||||
Cards from the talon are dealt to two waste piles, three
|
Cards from the talon are dealt to two waste piles, three
|
||||||
cards at a time to each. The top card from either waste pile
|
cards at a time to each. The top card from either waste pile
|
||||||
|
|
|
@ -361,7 +361,7 @@ class GI:
|
||||||
# Napoleon's Guards, Nationale, Oasis, Opera, Ordered Suits,
|
# Napoleon's Guards, Nationale, Oasis, Opera, Ordered Suits,
|
||||||
# Osmotic FreeCell, Pair FreeCell, Pairs 2, Petal,
|
# Osmotic FreeCell, Pair FreeCell, Pairs 2, Petal,
|
||||||
# Reserved Thirteens, Sea Spider, Sept Piles 0, Short Solitaire,
|
# Reserved Thirteens, Sea Spider, Sept Piles 0, Short Solitaire,
|
||||||
# Simple Alternations, Simple Spark, Step By Step, Strategy 7,
|
# Simple Alternations, Step By Step, Strategy 7,
|
||||||
# Stripped FreeCell, Tarantula, Triple Dispute, Trusty Twenty,
|
# Stripped FreeCell, Tarantula, Triple Dispute, Trusty Twenty,
|
||||||
# Two Ways 3, Up Or Down, Versailles, Vertical FreeCell,
|
# Two Ways 3, Up Or Down, Versailles, Vertical FreeCell,
|
||||||
# Wasp Baby, Yukon FreeCell
|
# Wasp Baby, Yukon FreeCell
|
||||||
|
@ -374,7 +374,7 @@ class GI:
|
||||||
363, 364, 372, 376, 383, 384, 385, 386, 390, 391, 393, 398,
|
363, 364, 372, 376, 383, 384, 385, 386, 390, 391, 393, 398,
|
||||||
405, 415, 416, 425, 451, 453, 461, 464, 466, 467, 476, 480,
|
405, 415, 416, 425, 451, 453, 461, 464, 466, 467, 476, 480,
|
||||||
484, 511, 512, 516, 561, 610, 625, 629, 631, 638, 641, 647,
|
484, 511, 512, 516, 561, 610, 625, 629, 631, 638, 641, 647,
|
||||||
650, 655, 678, 734, 751, 784, 825, 829, 834, 901,
|
650, 655, 678, 734, 751, 784, 825, 829, 834, 837, 901,
|
||||||
)),
|
)),
|
||||||
|
|
||||||
# xpat2 1.06 (we have 14 out of 16 games)
|
# xpat2 1.06 (we have 14 out of 16 games)
|
||||||
|
@ -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, 838)))
|
('fc-2.16', tuple(range(827, 839)))
|
||||||
)
|
)
|
||||||
|
|
||||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||||
|
|
|
@ -904,6 +904,7 @@ class Crossroads(Junction):
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
# * Inverse Spark
|
||||||
# * The Spark
|
# * The Spark
|
||||||
# * Single Spark
|
# * Single Spark
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
@ -930,10 +931,14 @@ class TheSpark_Talon(TalonStack):
|
||||||
return num_cards
|
return num_cards
|
||||||
|
|
||||||
|
|
||||||
class TheSpark(Game):
|
# Version of The Spark with incorrect rules from 2.14 and earlier.
|
||||||
|
# Renamed Kilowatt to differentiate from the correct version.
|
||||||
|
class Kilowatt(Game):
|
||||||
Hint_Class = CautiousDefaultHint
|
Hint_Class = CautiousDefaultHint
|
||||||
|
|
||||||
PER_ROW = 6
|
PER_ROW = 6
|
||||||
|
FOUNDATION_DIR = 1
|
||||||
|
ROW_DIR = -1
|
||||||
|
|
||||||
def createGame(self):
|
def createGame(self):
|
||||||
|
|
||||||
|
@ -945,7 +950,8 @@ class TheSpark(Game):
|
||||||
x, y = l.XM, l.YM
|
x, y = l.XM, l.YM
|
||||||
for i in range(self.gameinfo.decks * 4):
|
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//self.gameinfo.decks, base_rank=KING,
|
||||||
|
mod=13, dir=self.FOUNDATION_DIR))
|
||||||
x += l.XS
|
x += l.XS
|
||||||
x, y = l.XM, l.YM+l.YS
|
x, y = l.XM, l.YM+l.YS
|
||||||
s.talon = TheSpark_Talon(x, y, self, max_rounds=1, num_deal=3)
|
s.talon = TheSpark_Talon(x, y, self, max_rounds=1, num_deal=3)
|
||||||
|
@ -960,7 +966,8 @@ class TheSpark(Game):
|
||||||
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(self.PER_ROW):
|
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,
|
||||||
|
dir=self.ROW_DIR)
|
||||||
stack.CARD_XOFFSET, stack.CARD_YOFFSET = 0, 0
|
stack.CARD_XOFFSET, stack.CARD_YOFFSET = 0, 0
|
||||||
s.rows.append(stack)
|
s.rows.append(stack)
|
||||||
x += l.XS
|
x += l.XS
|
||||||
|
@ -969,7 +976,7 @@ class TheSpark(Game):
|
||||||
l.defaultStackGroups()
|
l.defaultStackGroups()
|
||||||
|
|
||||||
def _shuffleHook(self, cards):
|
def _shuffleHook(self, cards):
|
||||||
# move Aces to top of the Talon (i.e. first cards to be dealt)
|
# move Kings to top of the Talon (i.e. first cards to be dealt)
|
||||||
return self._shuffleHookMoveToTop(cards,
|
return self._shuffleHookMoveToTop(cards,
|
||||||
lambda c: (c.rank == KING, c.suit))
|
lambda c: (c.rank == KING, c.suit))
|
||||||
|
|
||||||
|
@ -980,6 +987,17 @@ class TheSpark(Game):
|
||||||
shallHighlightMatch = Game._shallHighlightMatch_SS
|
shallHighlightMatch = Game._shallHighlightMatch_SS
|
||||||
|
|
||||||
|
|
||||||
|
class TheSpark(Kilowatt):
|
||||||
|
FOUNDATION_DIR = -1
|
||||||
|
ROW_DIR = 1
|
||||||
|
|
||||||
|
def _shuffleHook(self, cards):
|
||||||
|
return Game._shuffleHook(self, cards)
|
||||||
|
|
||||||
|
def startGame(self):
|
||||||
|
self._startAndDealRowAndCards()
|
||||||
|
|
||||||
|
|
||||||
class SingleSpark(TheSpark):
|
class SingleSpark(TheSpark):
|
||||||
PER_ROW = 4
|
PER_ROW = 4
|
||||||
|
|
||||||
|
@ -1387,7 +1405,7 @@ registerGame(GameInfo(540, Waterloo, "Waterloo",
|
||||||
registerGame(GameInfo(556, Junction, "Junction",
|
registerGame(GameInfo(556, Junction, "Junction",
|
||||||
GI.GT_FORTY_THIEVES, 4, 0, GI.SL_MOSTLY_SKILL,
|
GI.GT_FORTY_THIEVES, 4, 0, GI.SL_MOSTLY_SKILL,
|
||||||
ranks=(0, 6, 7, 8, 9, 10, 11, 12)))
|
ranks=(0, 6, 7, 8, 9, 10, 11, 12)))
|
||||||
registerGame(GameInfo(564, TheSpark, "The Spark",
|
registerGame(GameInfo(564, Kilowatt, "Kilowatt",
|
||||||
GI.GT_FORTY_THIEVES, 2, 0, GI.SL_MOSTLY_LUCK))
|
GI.GT_FORTY_THIEVES, 2, 0, GI.SL_MOSTLY_LUCK))
|
||||||
registerGame(GameInfo(573, DoubleGoldMine, "Double Gold Mine",
|
registerGame(GameInfo(573, DoubleGoldMine, "Double Gold Mine",
|
||||||
GI.GT_NUMERICA | GI.GT_ORIGINAL, 2, 0,
|
GI.GT_NUMERICA | GI.GT_ORIGINAL, 2, 0,
|
||||||
|
@ -1428,4 +1446,7 @@ registerGame(GameInfo(815, Following, "Following",
|
||||||
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",
|
registerGame(GameInfo(837, SingleSpark, "Single Spark",
|
||||||
GI.GT_FORTY_THIEVES, 1, 0, GI.SL_MOSTLY_LUCK))
|
GI.GT_FORTY_THIEVES, 1, 0, GI.SL_MOSTLY_LUCK,
|
||||||
|
altnames=("Simple Spark")))
|
||||||
|
registerGame(GameInfo(838, TheSpark, "The Spark",
|
||||||
|
GI.GT_FORTY_THIEVES, 2, 0, GI.SL_MOSTLY_LUCK))
|
||||||
|
|
Loading…
Add table
Reference in a new issue