Skip to content

Commit

Permalink
Add Sevastopol game
Browse files Browse the repository at this point in the history
  • Loading branch information
joeraz committed Jun 24, 2024
1 parent b62630a commit b3c8390
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
18 changes: 18 additions & 0 deletions html-src/rules/sevastopol.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<h1>Sevastopol</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="kiev.html">Kiev</a>, but four of the tableau piles
are only dealt three cards.

<h3>Notes</h3>
<p>
Sevastopol was invented by Jan Wolter, and first appeared in his
app <a href="https://politaire.com">Politaire</a>.
4 changes: 2 additions & 2 deletions pysollib/gamedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def _callback(gi, gt=game_type):
800, 814, 820, 825, 889, 911, 926,
941)),
("Mary Whitmore Jones", (421, 624,)),
("Jan Wolter", (917, 939, 946,)),
("Jan Wolter", (917, 939, 946, 963,)),
)

GAMES_BY_PYSOL_VERSION = (
Expand Down Expand Up @@ -604,7 +604,7 @@ def _callback(gi, gt=game_type):
tuple(range(13168, 13170)) + tuple(range(18000, 18005)) +
tuple(range(19000, 19012)) + tuple(range(22303, 22311)) +
tuple(range(22353, 22361))),
('dev', tuple(range(961, 963))),
('dev', tuple(range(961, 964))),
)

# deprecated - the correct way is to or a GI.GT_XXX flag
Expand Down
21 changes: 19 additions & 2 deletions pysollib/games/yukon.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,6 @@ def startGame(self):
# ************************************************************************
# * Russian Spider
# * Double Russian Spider
# * Kiev
# * Dnieper
# ************************************************************************

class RussianSpider_RowStack(Yukon_SS_RowStack): # Spider_SS_RowStack
Expand Down Expand Up @@ -600,6 +598,12 @@ def startGame(self):
DoubleRussianSolitaire.startGame(self)


# ************************************************************************
# * Kiev
# * Dnieper
# * Sevastopol
# ************************************************************************

class Kiev(RussianSpider):
RowStack_Class = RussianSpider_RowStack
Layout_Method = staticmethod(Layout.klondikeLayout)
Expand All @@ -618,6 +622,17 @@ class Dnieper(Kiev):
RowStack_Class = StackWrapper(RussianSpider_RowStack, mod=13)


class Sevastopol(Kiev):

def startGame(self):
for i in range(2):
self.s.talon.dealRow(flip=0, frames=0)
r = self.s.rows
rows = (r[1], r[3], r[5])
self.s.talon.dealRow(rows=rows, flip=0, frames=0)
self._startAndDealRow()


# ************************************************************************
# * Brisbane
# ************************************************************************
Expand Down Expand Up @@ -916,3 +931,5 @@ def startGame(self):
GI.GT_YUKON, 1, 0, GI.SL_BALANCED))
registerGame(GameInfo(942, QuadrupleYukon, "Quadruple Yukon",
GI.GT_YUKON, 4, 0, GI.SL_BALANCED))
registerGame(GameInfo(963, Sevastopol, "Sevastopol",
GI.GT_SPIDER, 1, 0, GI.SL_BALANCED))

0 comments on commit b3c8390

Please sign in to comment.