Compare commits
4 commits
447dc4afea
...
3a356670bb
Author | SHA1 | Date | |
---|---|---|---|
|
3a356670bb | ||
|
885b2925ab | ||
|
b92debbbfd | ||
|
13c611949d |
BIN
data/images/buttons/bluecurve/color.png
Normal file
After Width: | Height: | Size: 903 B |
BIN
data/images/buttons/bluecurve/help.png
Normal file
After Width: | Height: | Size: 989 B |
BIN
data/images/buttons/bluecurve/next.png
Normal file
After Width: | Height: | Size: 574 B |
BIN
data/images/buttons/bluecurve/save.png
Normal file
After Width: | Height: | Size: 633 B |
BIN
data/images/buttons/bluecurve/statistics.png
Normal file
After Width: | Height: | Size: 680 B |
BIN
data/images/buttons/remix/color.png
Normal file
After Width: | Height: | Size: 620 B |
BIN
data/images/buttons/remix/help.png
Normal file
After Width: | Height: | Size: 619 B |
BIN
data/images/buttons/remix/next.png
Normal file
After Width: | Height: | Size: 312 B |
BIN
data/images/buttons/remix/save.png
Normal file
After Width: | Height: | Size: 256 B |
BIN
data/images/buttons/remix/statistics.png
Normal file
After Width: | Height: | Size: 280 B |
27
html-src/rules/xerxes.html
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<h1>Xerxes</h1>
|
||||||
|
<p>
|
||||||
|
Two-Deck game type. 2 stripped decks. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the foundations.
|
||||||
|
|
||||||
|
<h3>Rules</h3>
|
||||||
|
<p>
|
||||||
|
Xerxes is played with only the nines through kings of each
|
||||||
|
suit from two decks, plus the aces. The remaining cards are
|
||||||
|
removed.
|
||||||
|
<p>
|
||||||
|
One nine is dealt to the first foundation pile, and a tableau pile
|
||||||
|
of cards is dealt underneath it. When each nine is dealt, that is
|
||||||
|
dealt to the next foundation, and the next tableau pile is started
|
||||||
|
underneath it, until all cards are dealt.
|
||||||
|
<p>
|
||||||
|
Any card can be moved to an empty tableau pile, but otherwise, no
|
||||||
|
building on the tableau is allowed. The foundation piles are built
|
||||||
|
up from nine to king, then ace, regardless of suit. The game is won
|
||||||
|
if all cards are moved to the foundations.
|
||||||
|
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<p>
|
||||||
|
<i>Autodrop</i> is disabled for this game.
|
15
html-src/rules/zingara.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<h1>Zingara</h1>
|
||||||
|
<p>
|
||||||
|
Two-Deck game type. 2 stripped decks. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the foundations.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="xerxes.html">Xerxes</a>,
|
||||||
|
but played with cards from seven through king, plus the aces.
|
||||||
|
During the initial deal, the sevens are dealt to the foundations, and
|
||||||
|
if an eight or nine would be dealt that can be played to a foundation,
|
||||||
|
it is dealt there immediately.
|
|
@ -531,12 +531,29 @@ class Application:
|
||||||
for n, f in (
|
for n, f in (
|
||||||
(_('&OK'), 'ok'),
|
(_('&OK'), 'ok'),
|
||||||
(_('&Select'), 'ok'),
|
(_('&Select'), 'ok'),
|
||||||
|
(_('&Nice'), 'ok'),
|
||||||
|
(_('&Enjoy'), 'ok'),
|
||||||
|
(_("&Great"), 'ok'),
|
||||||
|
(_("&Cool"), 'ok'),
|
||||||
|
(_("&Yeah"), 'ok'),
|
||||||
|
(_("&Wow"), 'ok'),
|
||||||
|
(_("&Oh well"), 'ok'),
|
||||||
|
(_("&That's life"), 'ok'),
|
||||||
|
(_("&Hmm"), 'ok'),
|
||||||
(_('&Cancel'), 'cancel'),
|
(_('&Cancel'), 'cancel'),
|
||||||
(_('&Close'), 'cancel'),
|
(_('&Close'), 'cancel'),
|
||||||
(_('&New game'), 'new'),
|
(_('&New game'), 'new'),
|
||||||
(_('&Back to game'), 'back'),
|
(_('&Back to game'), 'back'),
|
||||||
(_('&Reset...'), 'reset'),
|
(_('&Reset...'), 'reset'),
|
||||||
(_('&Restart'), 'reset'),
|
(_('&Restart'), 'reset'),
|
||||||
|
(_('&Rules'), 'help'),
|
||||||
|
(_('&Info...'), 'help'),
|
||||||
|
(_('&Credits'), 'help'),
|
||||||
|
(_('&Next number'), 'next'),
|
||||||
|
(_('&Play this game'), 'next'),
|
||||||
|
(_('&Solid color...'), 'color'),
|
||||||
|
(_('&Save to file'), 'save'),
|
||||||
|
(_('&Statistics...'), 'statistics'),
|
||||||
):
|
):
|
||||||
fn = self.dataloader.findImage(f, dirname)
|
fn = self.dataloader.findImage(f, dirname)
|
||||||
im = loadImage(fn)
|
im = loadImage(fn)
|
||||||
|
|
|
@ -495,7 +495,7 @@ class GI:
|
||||||
("Mark Masten", (811,)),
|
("Mark Masten", (811,)),
|
||||||
("Albert Morehead and Geoffrey Mott-Smith", (25, 42, 48, 173, 282,
|
("Albert Morehead and Geoffrey Mott-Smith", (25, 42, 48, 173, 282,
|
||||||
303, 362, 547, 738,
|
303, 362, 547, 738,
|
||||||
845)),
|
845, 967, 968)),
|
||||||
("Toby Ord", (788,)),
|
("Toby Ord", (788,)),
|
||||||
("David Parlett", (64, 98, 294, 338, 654, 796, 812, 844)),
|
("David Parlett", (64, 98, 294, 338, 654, 796, 812, 844)),
|
||||||
("Joe R.", (938, 960,)),
|
("Joe R.", (938, 960,)),
|
||||||
|
@ -603,7 +603,7 @@ class GI:
|
||||||
tuple(range(13168, 13170)) + tuple(range(18000, 18005)) +
|
tuple(range(13168, 13170)) + tuple(range(18000, 18005)) +
|
||||||
tuple(range(19000, 19012)) + tuple(range(22303, 22311)) +
|
tuple(range(19000, 19012)) + tuple(range(22303, 22311)) +
|
||||||
tuple(range(22353, 22361))),
|
tuple(range(22353, 22361))),
|
||||||
('dev', tuple(range(961, 967))),
|
('dev', tuple(range(961, 969))),
|
||||||
)
|
)
|
||||||
|
|
||||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||||
|
|
|
@ -293,6 +293,8 @@ class SalicLaw(DerKatzenschwanz):
|
||||||
max_accept=UNLIMITED_ACCEPTS)
|
max_accept=UNLIMITED_ACCEPTS)
|
||||||
|
|
||||||
ROW_BASE_RANK = KING
|
ROW_BASE_RANK = KING
|
||||||
|
DEAL_ALL = False
|
||||||
|
HEIGHT = 5
|
||||||
|
|
||||||
#
|
#
|
||||||
# game layout
|
# game layout
|
||||||
|
@ -302,8 +304,14 @@ class SalicLaw(DerKatzenschwanz):
|
||||||
# create layout
|
# create layout
|
||||||
l, s = Layout(self), self.s
|
l, s = Layout(self), self.s
|
||||||
|
|
||||||
|
cols = 10
|
||||||
# set size
|
# set size
|
||||||
self.setSize(l.XM+10*l.XS, l.YM+(5+len(self.Foundation_Classes))*l.YS)
|
if self.DEAL_ALL:
|
||||||
|
cols = 8
|
||||||
|
|
||||||
|
self.setSize(l.XM + cols * l.XS,
|
||||||
|
l.YM + (self.HEIGHT +
|
||||||
|
len(self.Foundation_Classes)) * l.YS)
|
||||||
|
|
||||||
#
|
#
|
||||||
playcards = 4*l.YS // l.YOFFSET
|
playcards = 4*l.YS // l.YOFFSET
|
||||||
|
@ -333,8 +341,12 @@ class SalicLaw(DerKatzenschwanz):
|
||||||
stack.CARD_YOFFSET = yoffset
|
stack.CARD_YOFFSET = yoffset
|
||||||
s.rows.append(stack)
|
s.rows.append(stack)
|
||||||
x += l.XS
|
x += l.XS
|
||||||
s.talon = self.Talon_Class(l.XM+9*l.XS, l.YM, self)
|
if self.DEAL_ALL:
|
||||||
l.createText(s.talon, "s")
|
x, y = self.getInvisibleCoords()
|
||||||
|
s.talon = self.Talon_Class(x, y, self)
|
||||||
|
else:
|
||||||
|
s.talon = self.Talon_Class(l.XM + 9 * l.XS, l.YM, self)
|
||||||
|
l.createText(s.talon, "s")
|
||||||
|
|
||||||
# define stack-groups
|
# define stack-groups
|
||||||
l.defaultStackGroups()
|
l.defaultStackGroups()
|
||||||
|
@ -428,6 +440,71 @@ class FaerieQueen(SalicLaw):
|
||||||
shallHighlightMatch = Game._shallHighlightMatch_RK
|
shallHighlightMatch = Game._shallHighlightMatch_RK
|
||||||
|
|
||||||
|
|
||||||
|
# ************************************************************************
|
||||||
|
# * Xerxes
|
||||||
|
# * Zingara
|
||||||
|
# ************************************************************************
|
||||||
|
|
||||||
|
class Xerxes_RowStack(OpenStack):
|
||||||
|
def acceptsCards(self, from_stack, cards):
|
||||||
|
if len(self.cards) == 0:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
class Xerxes(SalicLaw):
|
||||||
|
Talon_Class = InitialDealTalonStack
|
||||||
|
Foundation_Classes = [
|
||||||
|
StackWrapper(RK_FoundationStack, max_move=0, max_cards=6, mod=13)
|
||||||
|
]
|
||||||
|
RowStack_Class = StackWrapper(Xerxes_RowStack, max_move=1)
|
||||||
|
ROW_BASE_RANK = 8
|
||||||
|
DEAL_ALL = True
|
||||||
|
HEIGHT = 4
|
||||||
|
AUTO_DEAL_RANK = 8
|
||||||
|
|
||||||
|
def startGame(self):
|
||||||
|
self.startDealSample()
|
||||||
|
i = -1
|
||||||
|
while self.s.talon.cards:
|
||||||
|
if self.s.talon.cards[-1].rank == self.ROW_BASE_RANK:
|
||||||
|
i += 1
|
||||||
|
self.s.talon.dealRow(rows=[self.s.foundations[i]], frames=4)
|
||||||
|
else:
|
||||||
|
played = False
|
||||||
|
if self.s.talon.cards[-1].rank <= self.AUTO_DEAL_RANK:
|
||||||
|
for f in range(i + 1):
|
||||||
|
if self.s.foundations[f].cards[-1].rank == \
|
||||||
|
self.s.talon.cards[-1].rank - 1:
|
||||||
|
self.s.talon.dealRow(rows=[self.s.foundations[f]],
|
||||||
|
frames=4)
|
||||||
|
played = True
|
||||||
|
break
|
||||||
|
if not played:
|
||||||
|
self.s.talon.dealRow(rows=[self.s.rows[i]], frames=4)
|
||||||
|
|
||||||
|
def _shuffleHook(self, cards):
|
||||||
|
for c in cards[:]:
|
||||||
|
if c.rank == self.ROW_BASE_RANK:
|
||||||
|
cards.remove(c)
|
||||||
|
break
|
||||||
|
cards.append(c)
|
||||||
|
return cards
|
||||||
|
|
||||||
|
def isGameWon(self):
|
||||||
|
return Game.isGameWon(self)
|
||||||
|
|
||||||
|
def getAutoStacks(self, event=None):
|
||||||
|
return ((), (), self.sg.dropstacks)
|
||||||
|
|
||||||
|
|
||||||
|
class Zingara(Xerxes):
|
||||||
|
Foundation_Classes = [
|
||||||
|
StackWrapper(RK_FoundationStack, max_move=0, max_cards=8, mod=13)
|
||||||
|
]
|
||||||
|
ROW_BASE_RANK = 6
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Intrigue
|
# * Intrigue
|
||||||
# * Laggard Lady
|
# * Laggard Lady
|
||||||
|
@ -752,3 +829,9 @@ registerGame(GameInfo(624, StepUp, "Step-Up",
|
||||||
registerGame(GameInfo(766, Kentish, "Kentish",
|
registerGame(GameInfo(766, Kentish, "Kentish",
|
||||||
GI.GT_2DECK_TYPE | GI.GT_OPEN | GI.GT_ORIGINAL, 2, 0,
|
GI.GT_2DECK_TYPE | GI.GT_OPEN | GI.GT_ORIGINAL, 2, 0,
|
||||||
GI.SL_MOSTLY_SKILL))
|
GI.SL_MOSTLY_SKILL))
|
||||||
|
registerGame(GameInfo(967, Xerxes, "Xerxes",
|
||||||
|
GI.GT_2DECK_TYPE | GI.GT_OPEN | GI.GT_STRIPPED, 2, 0,
|
||||||
|
GI.SL_BALANCED, ranks=(0, 8, 9, 10, 11, 12),))
|
||||||
|
registerGame(GameInfo(968, Zingara, "Zingara",
|
||||||
|
GI.GT_2DECK_TYPE | GI.GT_OPEN | GI.GT_STRIPPED, 2, 0,
|
||||||
|
GI.SL_BALANCED, ranks=(0, 6, 7, 8, 9, 10, 11, 12),))
|
||||||
|
|
|
@ -1485,6 +1485,7 @@ class ScorpionTowers(Game):
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
|
||||||
class Astrocyte(Game):
|
class Astrocyte(Game):
|
||||||
|
Hint_Class = Spider_Hint
|
||||||
|
|
||||||
def createGame(self):
|
def createGame(self):
|
||||||
|
|
||||||
|
|
|
@ -404,7 +404,7 @@ class SelectCardsetDialogWithPreview(MfxDialog):
|
||||||
s = (_("&Info..."), 10)
|
s = (_("&Info..."), 10)
|
||||||
kw = KwStruct(kw,
|
kw = KwStruct(kw,
|
||||||
strings=(s, 'sep',
|
strings=(s, 'sep',
|
||||||
_("&OK"), _("&Cancel"),),
|
_("&Select"), _("&Cancel"),),
|
||||||
default=0,
|
default=0,
|
||||||
resizable=True,
|
resizable=True,
|
||||||
)
|
)
|
||||||
|
|
|
@ -265,7 +265,7 @@ class SelectTileDialogWithPreview(MfxDialog):
|
||||||
def initKw(self, kw):
|
def initKw(self, kw):
|
||||||
kw = KwStruct(kw,
|
kw = KwStruct(kw,
|
||||||
strings=((_("&Solid color..."), 10),
|
strings=((_("&Solid color..."), 10),
|
||||||
'sep', _("&OK"), _("&Cancel"),),
|
'sep', _("&Select"), _("&Cancel"),),
|
||||||
default=0,
|
default=0,
|
||||||
resizable=True,
|
resizable=True,
|
||||||
font=None,
|
font=None,
|
||||||
|
|