mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added Kiev game.
This commit is contained in:
parent
1cfb7c3f69
commit
1086a5b584
4 changed files with 52 additions and 24 deletions
16
html-src/rules/kiev.html
Normal file
16
html-src/rules/kiev.html
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<h1>Kiev</h1>
|
||||||
|
<p>
|
||||||
|
Spider type. 1 deck. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Group all the cards in sets of 13 cards in descending sequence
|
||||||
|
by suit from King to Ace and move such sets to the foundations.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="russianspider.html">Russian Spider</a>,
|
||||||
|
but with a different layout consisting of seven piles of four cards
|
||||||
|
each (with only the top card of each visible). The remaining cards
|
||||||
|
are in the talon, and when there are no moves left, you can deal one
|
||||||
|
to each tableau pile.
|
|
@ -24,5 +24,6 @@ of the same suit. Such groups can be moved to the foundations.
|
||||||
|
|
||||||
<h3>Notes</h3>
|
<h3>Notes</h3>
|
||||||
<p>
|
<p>
|
||||||
Russian Spider is a combination of the games Russian Solitaire
|
Russian Spider is a combination of the games
|
||||||
and Spider. It is also known as Ukrainian Solitaire.
|
<a href="russiansolitaire.html">Russian Solitaire</a> and
|
||||||
|
<a href="spider.html">Spider</a>. It is also known as Ukrainian Solitaire.
|
||||||
|
|
|
@ -558,7 +558,8 @@ 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))),
|
||||||
('fc-2.20', tuple(range(855, 897)))
|
('fc-2.20', tuple(range(855, 897))),
|
||||||
|
('dev', tuple(range(897, 898)))
|
||||||
)
|
)
|
||||||
|
|
||||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||||
|
|
|
@ -56,18 +56,25 @@ class Yukon(Game):
|
||||||
RowStack_Class = StackWrapper(Yukon_AC_RowStack, base_rank=KING)
|
RowStack_Class = StackWrapper(Yukon_AC_RowStack, base_rank=KING)
|
||||||
Hint_Class = Yukon_Hint
|
Hint_Class = Yukon_Hint
|
||||||
|
|
||||||
def createGame(self, **layout):
|
DIFF_SUITS = True
|
||||||
|
|
||||||
|
def createGame(self, rows=7, **layout):
|
||||||
# create layout
|
# create layout
|
||||||
l, s = Layout(self), self.s
|
l, s = Layout(self), self.s
|
||||||
kwdefault(layout, rows=7, texts=0, playcards=25)
|
kwdefault(layout, rows=rows, texts=0, playcards=25)
|
||||||
self.Layout_Method(l, **layout)
|
self.Layout_Method(l, **layout)
|
||||||
self.setSize(l.size[0], l.size[1])
|
self.setSize(l.size[0], l.size[1])
|
||||||
# create stacks
|
# create stacks
|
||||||
s.talon = self.Talon_Class(l.s.talon.x, l.s.talon.y, self)
|
s.talon = self.Talon_Class(l.s.talon.x, l.s.talon.y, self)
|
||||||
for r in l.s.foundations:
|
for r in l.s.foundations:
|
||||||
s.foundations.append(
|
if self.DIFF_SUITS:
|
||||||
self.Foundation_Class(
|
s.foundations.append(
|
||||||
r.x, r.y, self, suit=r.suit, max_move=0))
|
self.Foundation_Class(
|
||||||
|
r.x, r.y, self, suit=r.suit, max_move=0))
|
||||||
|
else:
|
||||||
|
s.foundations.append(
|
||||||
|
self.Foundation_Class(
|
||||||
|
r.x, r.y, self, suit=ANY_SUIT, max_move=0))
|
||||||
for r in l.s.rows:
|
for r in l.s.rows:
|
||||||
s.rows.append(self.RowStack_Class(r.x, r.y, self))
|
s.rows.append(self.RowStack_Class(r.x, r.y, self))
|
||||||
# default
|
# default
|
||||||
|
@ -539,6 +546,7 @@ class Queensland(Yukon):
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Russian Spider
|
# * Russian Spider
|
||||||
# * Double Russian Spider
|
# * Double Russian Spider
|
||||||
|
# * Kiev
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
|
||||||
class RussianSpider_RowStack(Yukon_SS_RowStack): # Spider_SS_RowStack
|
class RussianSpider_RowStack(Yukon_SS_RowStack): # Spider_SS_RowStack
|
||||||
|
@ -556,31 +564,30 @@ class RussianSpider(RussianSolitaire):
|
||||||
RowStack_Class = StackWrapper(RussianSpider_RowStack, base_rank=KING)
|
RowStack_Class = StackWrapper(RussianSpider_RowStack, base_rank=KING)
|
||||||
Foundation_Class = Spider_SS_Foundation
|
Foundation_Class = Spider_SS_Foundation
|
||||||
|
|
||||||
def createGame(self, rows=7):
|
DIFF_SUITS = False
|
||||||
# create layout
|
|
||||||
l, s = Layout(self), self.s
|
|
||||||
l.yukonLayout(rows=rows, texts=0, playcards=25)
|
|
||||||
self.setSize(l.size[0], l.size[1])
|
|
||||||
# create stacks
|
|
||||||
s.talon = self.Talon_Class(l.s.talon.x, l.s.talon.y, self)
|
|
||||||
for r in l.s.foundations:
|
|
||||||
s.foundations.append(
|
|
||||||
self.Foundation_Class(
|
|
||||||
r.x, r.y, self, suit=ANY_SUIT, max_move=0))
|
|
||||||
for r in l.s.rows:
|
|
||||||
s.rows.append(self.RowStack_Class(r.x, r.y, self))
|
|
||||||
# default
|
|
||||||
l.defaultAll()
|
|
||||||
|
|
||||||
|
|
||||||
class DoubleRussianSpider(RussianSpider, DoubleRussianSolitaire):
|
class DoubleRussianSpider(RussianSpider, DoubleRussianSolitaire):
|
||||||
def createGame(self):
|
def createGame(self):
|
||||||
RussianSpider.createGame(self, rows=10)
|
Yukon.createGame(self, rows=10)
|
||||||
|
|
||||||
def startGame(self):
|
def startGame(self):
|
||||||
DoubleRussianSolitaire.startGame(self)
|
DoubleRussianSolitaire.startGame(self)
|
||||||
|
|
||||||
|
|
||||||
|
class Kiev(RussianSpider):
|
||||||
|
Layout_Method = staticmethod(Layout.klondikeLayout)
|
||||||
|
Talon_Class = DealRowTalonStack
|
||||||
|
|
||||||
|
def createGame(self):
|
||||||
|
return Yukon.createGame(self, waste=0, texts=1)
|
||||||
|
|
||||||
|
def startGame(self):
|
||||||
|
for i in range(3):
|
||||||
|
self.s.talon.dealRow(flip=0, frames=0)
|
||||||
|
self._startAndDealRow()
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Brisbane
|
# * Brisbane
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
@ -810,3 +817,6 @@ registerGame(GameInfo(826, YukonicPlague, "Yukonic Plague",
|
||||||
GI.GT_YUKON, 1, 0, GI.SL_BALANCED))
|
GI.GT_YUKON, 1, 0, GI.SL_BALANCED))
|
||||||
registerGame(GameInfo(857, TasmanianPatience, "Tasmanian Patience",
|
registerGame(GameInfo(857, TasmanianPatience, "Tasmanian Patience",
|
||||||
GI.GT_YUKON, 1, -1, GI.SL_BALANCED))
|
GI.GT_YUKON, 1, -1, GI.SL_BALANCED))
|
||||||
|
registerGame(GameInfo(897, Kiev, "Kiev",
|
||||||
|
GI.GT_SPIDER, 1, 0, GI.SL_BALANCED,
|
||||||
|
altnames=('Kyiv',)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue