mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Fixed rules for Exit.
This commit is contained in:
parent
3d9d074cae
commit
5e3f55f04e
4 changed files with 51 additions and 7 deletions
15
html-src/rules/exit.html
Normal file
15
html-src/rules/exit.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<h1>Exit</h1>
|
||||||
|
<p>
|
||||||
|
Pairing type. 1 deck. No redeals.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the single foundation.
|
||||||
|
|
||||||
|
<h3>Rules</h3>
|
||||||
|
<p>
|
||||||
|
Cards are dealt in ten columns of five cards, plus one column of two.
|
||||||
|
<p>
|
||||||
|
Pairs of exposed number cards can be removed if they total up to 11.
|
||||||
|
Jacks are removed in pairs. A queen can be removed if it is paired
|
||||||
|
off with a king, but not if they are of the same suit,
|
13
html-src/rules/relaxedexit.html
Normal file
13
html-src/rules/relaxedexit.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<h1>Relaxed Exit</h1>
|
||||||
|
<p>
|
||||||
|
Pairing type. 1 deck. No redeal.
|
||||||
|
|
||||||
|
<h3>Object</h3>
|
||||||
|
<p>
|
||||||
|
Move all cards to the single foundation.
|
||||||
|
|
||||||
|
<h3>Quick Description</h3>
|
||||||
|
<p>
|
||||||
|
Like <a href="exit.html">Exit</a>,
|
||||||
|
but kings and queens can be paired off if they
|
||||||
|
are of the same suit.
|
|
@ -274,9 +274,9 @@ class GI:
|
||||||
# 41, 42, 43, 58, 59, 92, 93, 94, 95, 96,
|
# 41, 42, 43, 58, 59, 92, 93, 94, 95, 96,
|
||||||
# 100, 105, 111, 112, 113, 130, 200, 201,
|
# 100, 105, 111, 112, 113, 130, 200, 201,
|
||||||
# )),
|
# )),
|
||||||
# Gnome AisleRiot 2.2.0 (we have 61 out of 70 games)
|
# Gnome AisleRiot 2.2.0 (we have 62 out of 70 games)
|
||||||
# still missing:
|
# still missing:
|
||||||
# Gay gordons, Helsinki,
|
# Helsinki,
|
||||||
# Isabel, Labyrinth, Quatorze, Thieves,
|
# Isabel, Labyrinth, Quatorze, Thieves,
|
||||||
# Treize, Valentine, Yeld.
|
# Treize, Valentine, Yeld.
|
||||||
("Gnome AisleRiot", (
|
("Gnome AisleRiot", (
|
||||||
|
@ -284,7 +284,7 @@ class GI:
|
||||||
41, 42, 43, 45, 48, 58, 59, 67, 89, 91, 92, 93, 94, 95, 96,
|
41, 42, 43, 45, 48, 58, 59, 67, 89, 91, 92, 93, 94, 95, 96,
|
||||||
100, 105, 111, 112, 113, 130, 139, 144, 146, 147, 148, 200,
|
100, 105, 111, 112, 113, 130, 139, 144, 146, 147, 148, 200,
|
||||||
201, 206, 224, 225, 229, 230, 233, 257, 258, 280, 281, 282,
|
201, 206, 224, 225, 229, 230, 233, 257, 258, 280, 281, 282,
|
||||||
283, 284, 551, 552, 553, 737,
|
283, 284, 551, 552, 553, 674, 737,
|
||||||
)),
|
)),
|
||||||
|
|
||||||
# KDE Patience 0.7.3 from KDE 1.1.2 (we have 6 out of 9 games)
|
# KDE Patience 0.7.3 from KDE 1.1.2 (we have 6 out of 9 games)
|
||||||
|
@ -318,7 +318,7 @@ class GI:
|
||||||
("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)),
|
||||||
("Toby Ord", (788,)),
|
("Toby Ord", (788,)),
|
||||||
("David Parlett", (64, 98, 294, 338, 654, 674,)),
|
("David Parlett", (64, 98, 294, 338, 654, 796,)),
|
||||||
("Randy Rasa", (187, 190, 191, 192,)),
|
("Randy Rasa", (187, 190, 191, 192,)),
|
||||||
("Captain Jeffrey T. Spaulding", (400,)),
|
("Captain Jeffrey T. Spaulding", (400,)),
|
||||||
("Adam Selene", (366,)),
|
("Adam Selene", (366,)),
|
||||||
|
|
|
@ -975,6 +975,7 @@ class Cheops(Pyramid):
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Exit
|
# * Exit
|
||||||
|
# * Relaxed Exit
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
|
||||||
class Exit_RowStack(Elevens_RowStack):
|
class Exit_RowStack(Elevens_RowStack):
|
||||||
|
@ -1033,7 +1034,7 @@ class Exit(Game):
|
||||||
return True
|
return True
|
||||||
if c1.rank == JACK and c2.rank == JACK:
|
if c1.rank == JACK and c2.rank == JACK:
|
||||||
return True
|
return True
|
||||||
if c1.rank + c2.rank == 23: # Q-K
|
if c1.rank + c2.rank == 23 and c1.suit != c2.suit: # Q-K
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -1073,6 +1074,17 @@ class Exit(Game):
|
||||||
return self._checkPair(card1, card2)
|
return self._checkPair(card1, card2)
|
||||||
|
|
||||||
|
|
||||||
|
class RelaxedExit(Exit):
|
||||||
|
def _checkPair(self, c1, c2):
|
||||||
|
if c1.rank + c2.rank == 9: # A-10, 2-9, 3-8, 4-7, 5-6
|
||||||
|
return True
|
||||||
|
if c1.rank == JACK and c2.rank == JACK:
|
||||||
|
return True
|
||||||
|
if c1.rank + c2.rank == 23: # Q-K
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
# * Two Pyramids
|
# * Two Pyramids
|
||||||
# ************************************************************************
|
# ************************************************************************
|
||||||
|
@ -1375,8 +1387,9 @@ registerGame(GameInfo(658, Apophis, "Apophis",
|
||||||
GI.GT_PAIRING_TYPE, 1, 2, GI.SL_MOSTLY_LUCK))
|
GI.GT_PAIRING_TYPE, 1, 2, GI.SL_MOSTLY_LUCK))
|
||||||
registerGame(GameInfo(659, Cheops, "Cheops",
|
registerGame(GameInfo(659, Cheops, "Cheops",
|
||||||
GI.GT_PAIRING_TYPE, 1, 0, GI.SL_MOSTLY_SKILL))
|
GI.GT_PAIRING_TYPE, 1, 0, GI.SL_MOSTLY_SKILL))
|
||||||
registerGame(GameInfo(674, Exit, "Exit",
|
registerGame(GameInfo(674, RelaxedExit, "Relaxed Exit",
|
||||||
GI.GT_PAIRING_TYPE, 1, 0, GI.SL_MOSTLY_SKILL))
|
GI.GT_PAIRING_TYPE | GI.GT_OPEN | GI.GT_RELAXED,
|
||||||
|
1, 0, GI.SL_MOSTLY_SKILL))
|
||||||
registerGame(GameInfo(677, TwoPyramids, "Two Pyramids",
|
registerGame(GameInfo(677, TwoPyramids, "Two Pyramids",
|
||||||
GI.GT_PAIRING_TYPE | GI.GT_ORIGINAL, 2, 2,
|
GI.GT_PAIRING_TYPE | GI.GT_ORIGINAL, 2, 2,
|
||||||
GI.SL_MOSTLY_LUCK))
|
GI.SL_MOSTLY_LUCK))
|
||||||
|
@ -1391,3 +1404,6 @@ registerGame(GameInfo(701, UpAndDown, "Up and Down",
|
||||||
GI.SL_MOSTLY_LUCK))
|
GI.SL_MOSTLY_LUCK))
|
||||||
registerGame(GameInfo(735, Hurricane, "Hurricane",
|
registerGame(GameInfo(735, Hurricane, "Hurricane",
|
||||||
GI.GT_PAIRING_TYPE, 1, 0, GI.SL_MOSTLY_LUCK))
|
GI.GT_PAIRING_TYPE, 1, 0, GI.SL_MOSTLY_LUCK))
|
||||||
|
registerGame(GameInfo(796, Exit, "Exit",
|
||||||
|
GI.GT_PAIRING_TYPE | GI.GT_OPEN, 1, 0,
|
||||||
|
GI.SL_MOSTLY_SKILL, altnames=('Gay Gordons',)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue