mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Compare commits
5 commits
cadf8b2084
...
f799093e35
Author | SHA1 | Date | |
---|---|---|---|
|
f799093e35 | ||
|
12118d12ed | ||
|
fd4a4e1378 | ||
|
63a63fdfd3 | ||
|
ff9cc5e98c |
15 changed files with 210 additions and 116 deletions
64
html-src/faq.html
Normal file
64
html-src/faq.html
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
<h1>FAQ</h1>
|
||||||
|
<h2>The animation is too slow...</h2>
|
||||||
|
<p>
|
||||||
|
Unfortunately the Tcl/Tk toolkit lacks a sprite concept, so
|
||||||
|
there is a lot of (invisible double-buffered) redraw going on
|
||||||
|
when dragging cards around.
|
||||||
|
<p>
|
||||||
|
Disabling <i>Card shadow</i>, <i>Shade legal moves</i>,
|
||||||
|
background table tiles and sound will somewhat improve the display speed.
|
||||||
|
|
||||||
|
<h2>The table tiles look strange</h2>
|
||||||
|
<p>
|
||||||
|
Background table tiles should only be enabled when using
|
||||||
|
a true-color video mode - otherwise they may look bad
|
||||||
|
because of dithering.
|
||||||
|
<p>
|
||||||
|
BTW, you can add your own background tiles by copying the images
|
||||||
|
to the main <i>data/tiles</i> or your home <i>~/.PySolFC/tiles</i> directory.
|
||||||
|
<!-- They must be in GIF or PPM format. -->
|
||||||
|
|
||||||
|
<h2>My antivirus app says the Windows installer contains a virus.</h2>
|
||||||
|
<p>
|
||||||
|
We have been asked about the fact that some anti viruses, including those
|
||||||
|
on <a href="https://www.virustotal.com/">VirusTotal</a>, have identified the Microsoft
|
||||||
|
Windows downloads as containing malware. What we know is that they are generated from
|
||||||
|
the <a href="https://en.wikipedia.org/wiki/Free_and_open-source_software">open source</a>
|
||||||
|
source code by <a href="https://www.appveyor.com/">AppVeyor</a>, are checked using
|
||||||
|
VirusTotal before they are uploaded, and at that point were considered to be malware clean.
|
||||||
|
<p>
|
||||||
|
However, as time passes, they seem to accumulate classifyings as containing malware
|
||||||
|
in what appears to be <a href="https://en.wikipedia.org/wiki/False_positives_and_false_negatives">false positives</a>. So we believe the downloads are nonetheless safe and free of
|
||||||
|
malware.
|
||||||
|
<p>
|
||||||
|
Furthermore, note that we believe that many anti-malware applications are harmful
|
||||||
|
by themselves, and that they are all an incomplete (non-)solution to an
|
||||||
|
issue that does not exist in <a href="https://en.wikipedia.org/wiki/Linux#Desktop">Linux</a> and the <a href="https://en.wikipedia.org/wiki/List_of_BSD_operating_systems">BSDs operating systems</a>.
|
||||||
|
<p>
|
||||||
|
For more information, see:
|
||||||
|
<ol>
|
||||||
|
<li><a href="https://sourceforge.net/p/pysolfc/discussion/503709/thread/d841b6a1/">Forum discussion</a></li>
|
||||||
|
<li><a href="http://linuxmafia.com/~rick/faq/">Viruses on Linux</a></li>
|
||||||
|
<li><a href="https://www.mail-archive.com/wikimedia-l@lists.wikimedia.org/msg30001.html">Discussion about anti-viruses.</a></li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<h2>I received an error that there is no module named "formatter".</h2>
|
||||||
|
<p>
|
||||||
|
This error occurs if you're trying to run an older version of PySolFC
|
||||||
|
with Python 3.10. If you are using Python 3.10 or later, please upgrade your
|
||||||
|
version of PySolFC to 2.14.0 or later - older versions are not compatible with
|
||||||
|
Python 3.10.
|
||||||
|
<p>
|
||||||
|
If you are getting your copy from your Linux distribution's package manager,
|
||||||
|
please contact the people who maintain the packages for your distribution.
|
||||||
|
You can always get the latest version from the PySolFC website or from
|
||||||
|
Flathub.
|
||||||
|
|
||||||
|
<h2>It won't let me deal more cards in Spider.</h2>
|
||||||
|
<p>
|
||||||
|
When playing Spider, you are not allowed to deal more cards if there are any
|
||||||
|
empty piles. If there aren't enough cards left to put one in each pile, the
|
||||||
|
game is lost. Part of the game is planning ahead when to deal more cards to
|
||||||
|
avoid this situation.
|
||||||
|
<p>
|
||||||
|
If you want a variation without this rule, you can play Relaxed Spider instead.
|
|
@ -46,6 +46,7 @@ fix_gettext()
|
||||||
files = [
|
files = [
|
||||||
('credits.html', 'PySol Credits'),
|
('credits.html', 'PySol Credits'),
|
||||||
('credits_old.html', 'PySol Credits'),
|
('credits_old.html', 'PySol Credits'),
|
||||||
|
('faq.html', 'PySol - FAQ'),
|
||||||
('ganjifa.html', 'PySol - General Ganjifa Card Rules'),
|
('ganjifa.html', 'PySol - General Ganjifa Card Rules'),
|
||||||
('general_rules.html', 'PySol - General Rules'),
|
('general_rules.html', 'PySol - General Rules'),
|
||||||
('glossary.html', 'PySol - Glossary'),
|
('glossary.html', 'PySol - Glossary'),
|
||||||
|
|
|
@ -55,27 +55,6 @@ disable certain features as they would be trivial otherwise.
|
||||||
The logic involved is not too clever on purpose (i.e. it does not consult the hint system).
|
The logic involved is not too clever on purpose (i.e. it does not consult the hint system).
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2>The animation is too slow...</h2>
|
|
||||||
<p>
|
|
||||||
Unfortunately the Tcl/Tk toolkit lacks a sprite concept, so
|
|
||||||
there is a lot of (invisible double-buffered) redraw going on
|
|
||||||
when dragging cards around.
|
|
||||||
<p>
|
|
||||||
Disabling <i>Card shadow</i>, <i>Shade legal moves</i>,
|
|
||||||
background table tiles and sound will somewhat improve the display speed.
|
|
||||||
|
|
||||||
|
|
||||||
<h2>The table tiles look strange</h2>
|
|
||||||
<p>
|
|
||||||
Background table tiles should only be enabled when using
|
|
||||||
a true-color video mode - otherwise they may look bad
|
|
||||||
because of dithering.
|
|
||||||
<p>
|
|
||||||
BTW, you can add your own background tiles by copying the images
|
|
||||||
to the main <i>data/tiles</i> or your home <i>~/.PySolFC/tiles</i> directory.
|
|
||||||
<!-- They must be in GIF or PPM format. -->
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Some notes about scoring</h2>
|
<h2>Some notes about scoring</h2>
|
||||||
<p>
|
<p>
|
||||||
<ul type="disc">
|
<ul type="disc">
|
||||||
|
|
|
@ -19,9 +19,10 @@
|
||||||
<li> <a href="cardset_customization.html">Cardset Customization</a>
|
<li> <a href="cardset_customization.html">Cardset Customization</a>
|
||||||
<li> <a href="plugins.html">Plugins</a>
|
<li> <a href="plugins.html">Plugins</a>
|
||||||
</ul>
|
</ul>
|
||||||
<h2>Misc</h2>
|
<h2>About</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li> <a href="news.html">What's new?</a>
|
<li> <a href="news.html">What's new?</a>
|
||||||
|
<li> <a href="faq.html">FAQ</a>
|
||||||
<li> <a href="report_bug.html">Report a Bug</a>
|
<li> <a href="report_bug.html">Report a Bug</a>
|
||||||
<li> <a href="license.html">PySol license terms</a>
|
<li> <a href="license.html">PySol license terms</a>
|
||||||
<li> <a href="credits.html">PySol credits</a>
|
<li> <a href="credits.html">PySol credits</a>
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
<h1>Report a Bug</h1>
|
<h1>Report a Bug</h1>
|
||||||
<p>
|
<p>
|
||||||
Before you report a bug, please verify that you are running
|
Before you report a bug, please verify that you are running
|
||||||
the latest version of PySolFC, and also check the PySolFC site's
|
the latest version of PySolFC. Also, check the
|
||||||
<a href="https://pysolfc.sourceforge.io/faq.html">FAQ page</a>,
|
<a href="faq.html">FAQ</a>, and issues previously reported
|
||||||
and issues previously reported on GitHub, to ensure that the bug
|
on GitHub, to ensure that the bug was not previously reported.
|
||||||
was not previously reported.
|
|
||||||
<p>
|
<p>
|
||||||
If you found a bug in PySolFC, the best place to report it
|
If you found a bug in PySolFC, the best place to report it
|
||||||
is on GitHub. To do so, create an issue at
|
is on GitHub. To do so, create an issue at
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<h1>Big Braid</h1>
|
<h1>Big Braid (Der große Zopf)</h1>
|
||||||
<p>
|
<p>
|
||||||
Napoleon type. 3 decks. 2 redeals.
|
Napoleon type. 3 decks. 2 redeals.
|
||||||
|
|
||||||
|
|
19
html-src/rules/louis.html
Normal file
19
html-src/rules/louis.html
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<h1>Louis</h1>
|
||||||
|
<p>
|
||||||
|
Two-Deck game type. 2 decks. 2 redeals.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all the cards to the foundations.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="sthelena.html">St. Helena</a>,
|
||||||
|
but at the start of the game, a card is dealt to each of the
|
||||||
|
twelve tableau piles. During this round, an empty tableau pile
|
||||||
|
will be immediately filled from the talon. When no moves are left,
|
||||||
|
the rest of the deck can be dealt.
|
||||||
|
<p>
|
||||||
|
Also, there are no restrictions as to which tableau piles
|
||||||
|
cards can be moved to foundations from, and tableau piles are
|
||||||
|
built up or down by same suit.
|
22
html-src/rules/pyramidthirteen.html
Normal file
22
html-src/rules/pyramidthirteen.html
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<h1>Pyramid Thirteen</h1>
|
||||||
|
<p>
|
||||||
|
Pairing game type. 1 deck. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the single foundation.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="pyramid.html">Pyramid</a>, but all but the
|
||||||
|
front row of the pyramid are dealt face-down, and no redeals
|
||||||
|
are allowed.
|
||||||
|
|
||||||
|
<h3>Notes</h3>
|
||||||
|
<p>
|
||||||
|
This difficult variant of Pyramid is based on the Gnome AisleRiot
|
||||||
|
rules. It is called "Thirteen" there, but renamed Pyramid Thirteen
|
||||||
|
here to avoid confusion with the game
|
||||||
|
<a href="thirteens.html">Thirteens</a>.
|
||||||
|
<p>
|
||||||
|
<i>Quickplay</i> is disabled for this game.
|
13
html-src/rules/waspii.html
Normal file
13
html-src/rules/waspii.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<h1>Wasp II</h1>
|
||||||
|
<p>
|
||||||
|
Spider type. 1 deck. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the foundations.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="wasp.html">Wasp</a>,
|
||||||
|
but only three of the tableau piles contain
|
||||||
|
face-down cards (similar to <a href="scorpionii.html">Scorpion II</a>).
|
|
@ -367,12 +367,12 @@ class GI:
|
||||||
# Hamilton, Labyrinth, Treize, Wall
|
# Hamilton, Labyrinth, Treize, Wall
|
||||||
("Gnome AisleRiot", (
|
("Gnome AisleRiot", (
|
||||||
1, 2, 8, 9, 11, 12, 13, 19, 24, 27, 29, 31, 33, 34, 35, 36,
|
1, 2, 8, 9, 11, 12, 13, 19, 24, 27, 29, 31, 33, 34, 35, 36,
|
||||||
38, 40, 41, 42, 43, 45, 48, 58, 65, 67, 89, 91, 92, 93, 94,
|
38, 40, 41, 42, 43, 44, 45, 48, 58, 65, 67, 89, 91, 92, 93,
|
||||||
95, 96, 97, 100, 104, 105, 111, 112, 113, 130, 135, 139, 144,
|
94, 95, 96, 97, 100, 104, 105, 111, 112, 113, 130, 135, 139,
|
||||||
146, 147, 148, 200, 201, 206, 224, 225, 229, 230, 233, 257,
|
144, 146, 147, 148, 200, 201, 206, 224, 225, 229, 230, 233,
|
||||||
258, 277, 280, 281, 282, 283, 284, 334, 384, 479, 495, 551,
|
257, 258, 277, 280, 281, 282, 283, 284, 334, 384, 479, 495,
|
||||||
552, 553, 572, 593, 674, 700, 715, 716, 737, 772, 810, 819,
|
551, 552, 553, 572, 593, 674, 700, 715, 716, 737, 772, 810,
|
||||||
824, 829, 859, 874, 906, 934, 22231,
|
819, 824, 829, 859, 874, 906, 934, 22231,
|
||||||
)),
|
)),
|
||||||
|
|
||||||
# Hoyle Card Games
|
# Hoyle Card Games
|
||||||
|
@ -594,7 +594,8 @@ class GI:
|
||||||
tuple(range(19000, 19012)) + tuple(range(22303, 22311)) +
|
tuple(range(19000, 19012)) + tuple(range(22303, 22311)) +
|
||||||
tuple(range(22353, 22361))),
|
tuple(range(22353, 22361))),
|
||||||
('fc-3.1', tuple(range(961, 971))),
|
('fc-3.1', tuple(range(961, 971))),
|
||||||
('dev', tuple(range(971, 975)) + tuple(range(18005, 18007)) + (526,)),
|
('dev', tuple(range(971, 977)) + tuple(range(18005, 18007)) +
|
||||||
|
(44, 526,)),
|
||||||
)
|
)
|
||||||
|
|
||||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||||
|
|
|
@ -646,7 +646,8 @@ registerGame(GameInfo(376, Backbone, "Backbone",
|
||||||
registerGame(GameInfo(377, BackbonePlus, "Backbone +",
|
registerGame(GameInfo(377, BackbonePlus, "Backbone +",
|
||||||
GI.GT_NAPOLEON, 2, 0, GI.SL_BALANCED))
|
GI.GT_NAPOLEON, 2, 0, GI.SL_BALANCED))
|
||||||
registerGame(GameInfo(510, BigBraid, "Big Braid",
|
registerGame(GameInfo(510, BigBraid, "Big Braid",
|
||||||
GI.GT_NAPOLEON | GI.GT_ORIGINAL, 3, 2, GI.SL_BALANCED))
|
GI.GT_NAPOLEON | GI.GT_ORIGINAL, 3, 2, GI.SL_BALANCED,
|
||||||
|
altnames=("Der grose Zopf",)))
|
||||||
registerGame(GameInfo(694, Casket, "Casket",
|
registerGame(GameInfo(694, Casket, "Casket",
|
||||||
GI.GT_2DECK_TYPE, 2, 0, GI.SL_BALANCED))
|
GI.GT_2DECK_TYPE, 2, 0, GI.SL_BALANCED))
|
||||||
registerGame(GameInfo(717, Well, "Well",
|
registerGame(GameInfo(717, Well, "Well",
|
||||||
|
|
|
@ -383,51 +383,18 @@ class PyramidDozen(Giza):
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Thirteen
|
# * Pyramid Thirteen
|
||||||
# * FIXME: UNFINISHED
|
|
||||||
# * (this doesn't work yet as 2 cards of the Waste should be playable)
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
|
||||||
|
# Previous comments suggest there would need to be two waste piles. This
|
||||||
|
# is not true. Based on AisleRiot's rules, the two waste cards can only
|
||||||
|
# be played with each other, which is the same as how PySol's traditional
|
||||||
|
# version works. So the remaining AisleRiot differences are captured
|
||||||
|
# in "Pyramid Thirteen", renamed from "Thirteen" to avoid confusion with
|
||||||
|
# "Thirteens"
|
||||||
|
|
||||||
class Thirteen(Pyramid):
|
class Thirteen(Pyramid):
|
||||||
|
Talon_Class = StackWrapper(Pyramid_Talon, max_rounds=1, max_accept=1)
|
||||||
#
|
|
||||||
# game layout
|
|
||||||
#
|
|
||||||
|
|
||||||
def createGame(self):
|
|
||||||
# create layout
|
|
||||||
layout, s = Layout(self), self.s
|
|
||||||
|
|
||||||
# set window
|
|
||||||
self.setSize(7*layout.XS+layout.XM, 5*layout.YS+layout.YM)
|
|
||||||
|
|
||||||
# create stacks
|
|
||||||
for i in range(7):
|
|
||||||
x = layout.XM + (6-i) * layout.XS // 2
|
|
||||||
y = layout.YM + layout.YS + i * layout.YS // 2
|
|
||||||
for j in range(i+1):
|
|
||||||
s.rows.append(Pyramid_RowStack(x, y, self))
|
|
||||||
x = x + layout.XS
|
|
||||||
x, y = layout.XM, layout.YM
|
|
||||||
s.talon = WasteTalonStack(x, y, self, max_rounds=1)
|
|
||||||
layout.createText(s.talon, "s")
|
|
||||||
x = x + layout.XS
|
|
||||||
s.waste = Pyramid_Waste(x, y, self, max_accept=1)
|
|
||||||
layout.createText(s.waste, "s")
|
|
||||||
s.waste.CARD_XOFFSET = 14
|
|
||||||
x, y = self.width - layout.XS, layout.YM
|
|
||||||
s.foundations.append(Pyramid_Foundation(x, y, self,
|
|
||||||
suit=ANY_SUIT, dir=0, base_rank=ANY_RANK,
|
|
||||||
max_move=0, max_cards=52))
|
|
||||||
|
|
||||||
# define stack-groups
|
|
||||||
self.sg.talonstacks = [s.talon] + [s.waste]
|
|
||||||
self.sg.openstacks = s.rows + self.sg.talonstacks
|
|
||||||
self.sg.dropstacks = s.rows + self.sg.talonstacks
|
|
||||||
|
|
||||||
#
|
|
||||||
# game overrides
|
|
||||||
#
|
|
||||||
|
|
||||||
def startGame(self):
|
def startGame(self):
|
||||||
self.startDealSample()
|
self.startDealSample()
|
||||||
|
@ -1888,8 +1855,8 @@ registerGame(GameInfo(193, RelaxedPyramid, "Relaxed Pyramid",
|
||||||
GI.GT_PAIRING_TYPE | GI.GT_RELAXED, 1, 2,
|
GI.GT_PAIRING_TYPE | GI.GT_RELAXED, 1, 2,
|
||||||
GI.SL_MOSTLY_LUCK,
|
GI.SL_MOSTLY_LUCK,
|
||||||
altnames=("Pyramid's Stones", "Pyramid Clear")))
|
altnames=("Pyramid's Stones", "Pyramid Clear")))
|
||||||
# registerGame(GameInfo(44, Thirteen, "Thirteen",
|
registerGame(GameInfo(44, Thirteen, "Pyramid Thirteen",
|
||||||
# GI.GT_PAIRING_TYPE, 1, 0))
|
GI.GT_PAIRING_TYPE, 1, 0, GI.SL_MOSTLY_LUCK))
|
||||||
registerGame(GameInfo(592, Giza, "Giza",
|
registerGame(GameInfo(592, Giza, "Giza",
|
||||||
GI.GT_PAIRING_TYPE | GI.GT_OPEN, 1, 0, GI.SL_BALANCED))
|
GI.GT_PAIRING_TYPE | GI.GT_OPEN, 1, 0, GI.SL_BALANCED))
|
||||||
registerGame(GameInfo(593, Thirteens, "Thirteens",
|
registerGame(GameInfo(593, Thirteens, "Thirteens",
|
||||||
|
|
|
@ -291,7 +291,8 @@ class Maze(Game):
|
||||||
# register the game
|
# register the game
|
||||||
registerGame(GameInfo(118, SiebenBisAs, "Sieben bis As",
|
registerGame(GameInfo(118, SiebenBisAs, "Sieben bis As",
|
||||||
GI.GT_MONTANA | GI.GT_OPEN | GI.GT_STRIPPED, 1, 0,
|
GI.GT_MONTANA | GI.GT_OPEN | GI.GT_STRIPPED, 1, 0,
|
||||||
GI.SL_MOSTLY_SKILL, ranks=(0, 6, 7, 8, 9, 10, 11, 12)))
|
GI.SL_MOSTLY_SKILL, ranks=(0, 6, 7, 8, 9, 10, 11, 12),
|
||||||
|
altnames=("Seven to Ace",)))
|
||||||
registerGame(GameInfo(144, Maze, "Maze",
|
registerGame(GameInfo(144, Maze, "Maze",
|
||||||
GI.GT_MONTANA | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL,
|
GI.GT_MONTANA | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL,
|
||||||
si={"ncards": 48}))
|
si={"ncards": 48}))
|
||||||
|
|
|
@ -348,15 +348,16 @@ class Scorpion_RowStack(Yukon_SS_RowStack, Spider_RowStack):
|
||||||
|
|
||||||
|
|
||||||
class Scorpion(RelaxedSpider):
|
class Scorpion(RelaxedSpider):
|
||||||
|
|
||||||
Hint_Class = YukonType_Hint
|
Hint_Class = YukonType_Hint
|
||||||
RowStack_Class = StackWrapper(Scorpion_RowStack, base_rank=KING)
|
RowStack_Class = StackWrapper(Scorpion_RowStack, base_rank=KING)
|
||||||
|
|
||||||
|
FACEDOWNS = (4, 4, 4, 0, 0, 0)
|
||||||
|
|
||||||
def createGame(self):
|
def createGame(self):
|
||||||
RelaxedSpider.createGame(self, rows=7, playcards=20)
|
RelaxedSpider.createGame(self, rows=7, playcards=20)
|
||||||
|
|
||||||
def startGame(self):
|
def startGame(self):
|
||||||
for i in (4, 4, 4, 0, 0, 0):
|
for i in self.FACEDOWNS:
|
||||||
self.s.talon.dealRow(rows=self.s.rows[:i], flip=0, frames=0)
|
self.s.talon.dealRow(rows=self.s.rows[:i], flip=0, frames=0)
|
||||||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=1, frames=0)
|
self.s.talon.dealRow(rows=self.s.rows[i:], flip=1, frames=0)
|
||||||
self._startAndDealRow()
|
self._startAndDealRow()
|
||||||
|
@ -379,46 +380,46 @@ class ScorpionTail(Scorpion):
|
||||||
shallHighlightMatch = Game._shallHighlightMatch_AC
|
shallHighlightMatch = Game._shallHighlightMatch_AC
|
||||||
|
|
||||||
|
|
||||||
|
# ************************************************************************
|
||||||
|
# * Double Scorpion
|
||||||
|
# * Triple Scorpion
|
||||||
|
# ************************************************************************
|
||||||
|
|
||||||
class DoubleScorpion(Scorpion):
|
class DoubleScorpion(Scorpion):
|
||||||
Talon_Class = InitialDealTalonStack
|
FACEDOWNS = (5, 5, 5, 5, 0, 0, 0, 0, 0)
|
||||||
|
|
||||||
def createGame(self):
|
def createGame(self):
|
||||||
RelaxedSpider.createGame(self, rows=10, playcards=26, texts=0)
|
RelaxedSpider.createGame(self, rows=10, playcards=26, texts=0)
|
||||||
|
|
||||||
def startGame(self):
|
|
||||||
for i in (5, 5, 5, 5, 0, 0, 0, 0, 0):
|
|
||||||
self.s.talon.dealRow(rows=self.s.rows[:i], flip=0, frames=0)
|
|
||||||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=1, frames=0)
|
|
||||||
self.startDealSample()
|
|
||||||
self.s.talon.dealRow()
|
|
||||||
self.s.talon.dealRowAvail()
|
|
||||||
|
|
||||||
|
|
||||||
class TripleScorpion(Scorpion):
|
class TripleScorpion(Scorpion):
|
||||||
Talon_Class = InitialDealTalonStack
|
Talon_Class = InitialDealTalonStack
|
||||||
|
|
||||||
|
FACEDOWNS = (5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0)
|
||||||
|
|
||||||
def createGame(self):
|
def createGame(self):
|
||||||
RelaxedSpider.createGame(self, rows=13, playcards=30, texts=0)
|
RelaxedSpider.createGame(self, rows=13, playcards=30, texts=0)
|
||||||
|
|
||||||
def startGame(self):
|
|
||||||
for i in (5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0):
|
# ************************************************************************
|
||||||
self.s.talon.dealRow(rows=self.s.rows[:i], flip=0, frames=0)
|
# * Scorpion II
|
||||||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=1, frames=0)
|
# ************************************************************************
|
||||||
self._startAndDealRow()
|
|
||||||
|
class ScorpionII(Scorpion):
|
||||||
|
FACEDOWNS = (3, 3, 3, 0, 0, 0)
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Wasp
|
# * Wasp
|
||||||
|
# * Wasp II
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
|
||||||
class Wasp(Scorpion):
|
class Wasp(Scorpion):
|
||||||
RowStack_Class = Scorpion_RowStack # anything on an empty space
|
RowStack_Class = Scorpion_RowStack # anything on an empty space
|
||||||
|
|
||||||
def startGame(self):
|
|
||||||
for i in (3, 3, 3, 0, 0, 0):
|
class WaspII(ScorpionII):
|
||||||
self.s.talon.dealRow(rows=self.s.rows[:i], flip=0, frames=0)
|
RowStack_Class = Scorpion_RowStack
|
||||||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=1, frames=0)
|
|
||||||
self._startAndDealRow()
|
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
@ -1124,19 +1125,6 @@ class Incompatibility(Spidike):
|
||||||
self._startDealNumRowsAndDealSingleRow(4)
|
self._startDealNumRowsAndDealSingleRow(4)
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
|
||||||
# * Scorpion II
|
|
||||||
# ************************************************************************
|
|
||||||
|
|
||||||
class ScorpionII(Scorpion):
|
|
||||||
|
|
||||||
def startGame(self):
|
|
||||||
for i in (3, 3, 3, 0, 0, 0):
|
|
||||||
self.s.talon.dealRow(rows=self.s.rows[:i], flip=0, frames=0)
|
|
||||||
self.s.talon.dealRow(rows=self.s.rows[i:], flip=1, frames=0)
|
|
||||||
self._startAndDealRow()
|
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Tarantula
|
# * Tarantula
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
@ -1671,3 +1659,5 @@ registerGame(GameInfo(917, Astrocyte, "Astrocyte",
|
||||||
registerGame(GameInfo(971, Microbe, "Microbe",
|
registerGame(GameInfo(971, Microbe, "Microbe",
|
||||||
GI.GT_SPIDER | GI.GT_SEPARATE_DECKS, 2, 0,
|
GI.GT_SPIDER | GI.GT_SEPARATE_DECKS, 2, 0,
|
||||||
GI.SL_MOSTLY_SKILL))
|
GI.SL_MOSTLY_SKILL))
|
||||||
|
registerGame(GameInfo(976, WaspII, "Wasp II",
|
||||||
|
GI.GT_SPIDER, 1, 0, GI.SL_MOSTLY_SKILL))
|
||||||
|
|
|
@ -51,10 +51,18 @@ class StHelena_Talon(TalonStack):
|
||||||
# move all cards to the Talon and redeal
|
# move all cards to the Talon and redeal
|
||||||
lr = len(self.game.s.rows)
|
lr = len(self.game.s.rows)
|
||||||
num_cards = 0
|
num_cards = 0
|
||||||
assert len(self.cards) == 0
|
if len(self.cards) > 0:
|
||||||
|
num_cards = len(self.cards)
|
||||||
|
self.game.startDealSample()
|
||||||
|
for i in range(lr):
|
||||||
|
k = min(lr, len(self.cards))
|
||||||
|
for j in range(k):
|
||||||
|
self.game.flipAndMoveMove(self, self.game.s.rows[j], 4)
|
||||||
|
self.game.stopSamples()
|
||||||
|
return num_cards
|
||||||
for r in self.game.s.rows[::-1]:
|
for r in self.game.s.rows[::-1]:
|
||||||
for i in range(len(r.cards)):
|
for i in range(len(r.cards)):
|
||||||
num_cards = num_cards + 1
|
num_cards += 1
|
||||||
self.game.moveMove(1, r, self, frames=0)
|
self.game.moveMove(1, r, self, frames=0)
|
||||||
assert len(self.cards) == num_cards
|
assert len(self.cards) == num_cards
|
||||||
if num_cards == 0: # game already finished
|
if num_cards == 0: # game already finished
|
||||||
|
@ -169,6 +177,32 @@ class BoxKite(StHelena):
|
||||||
|
|
||||||
shallHighlightMatch = Game._shallHighlightMatch_RKW
|
shallHighlightMatch = Game._shallHighlightMatch_RKW
|
||||||
|
|
||||||
|
# ************************************************************************
|
||||||
|
# * Louis
|
||||||
|
# ************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
class Louis(StHelena):
|
||||||
|
Foundation_Class = SS_FoundationStack
|
||||||
|
RowStack_Class = StackWrapper(UD_SS_RowStack, base_rank=NO_RANK, mod=13)
|
||||||
|
|
||||||
|
shallHighlightMatch = Game._shallHighlightMatch_RKW
|
||||||
|
|
||||||
|
def startGame(self):
|
||||||
|
self.startDealSample()
|
||||||
|
self.s.talon.dealRow(self.s.foundations)
|
||||||
|
self.s.talon.dealRow()
|
||||||
|
|
||||||
|
def _shuffleHook(self, cards):
|
||||||
|
return self._shuffleHookMoveToTop(
|
||||||
|
cards, lambda c: (c.deck == 0 and c.rank in (0, 12),
|
||||||
|
(-c.rank, c.suit)), 8)
|
||||||
|
|
||||||
|
def fillStack(self, stack):
|
||||||
|
if (self.s.talon.cards and stack in self.s.rows
|
||||||
|
and len(stack.cards) == 0):
|
||||||
|
self.s.talon.dealRow(rows=[stack])
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Les Quatre Coins
|
# * Les Quatre Coins
|
||||||
|
@ -452,3 +486,5 @@ registerGame(GameInfo(621, RegalFamily, "Regal Family",
|
||||||
registerGame(GameInfo(859, KingsAudience, "King's Audience",
|
registerGame(GameInfo(859, KingsAudience, "King's Audience",
|
||||||
GI.GT_1DECK_TYPE, 1, 0, GI.SL_MOSTLY_LUCK,
|
GI.GT_1DECK_TYPE, 1, 0, GI.SL_MOSTLY_LUCK,
|
||||||
altnames=("Queen's Audience")))
|
altnames=("Queen's Audience")))
|
||||||
|
registerGame(GameInfo(975, Louis, "Louis",
|
||||||
|
GI.GT_2DECK_TYPE, 2, 2, GI.SL_BALANCED))
|
||||||
|
|
Loading…
Add table
Reference in a new issue