mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added 23 Skidoo game.
This commit is contained in:
parent
1a5f73f59f
commit
26ff013153
3 changed files with 32 additions and 3 deletions
14
html-src/rules/23skidoo.html
Normal file
14
html-src/rules/23skidoo.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<h1>23 Skidoo</h1>
|
||||
<p>
|
||||
One deck type. 1 deck. No redeal.
|
||||
|
||||
<h3>Object</h3>
|
||||
<p>
|
||||
Compress the entire deck into one pile.
|
||||
|
||||
<h3>Quick Description</h3>
|
||||
<p>
|
||||
Like <a href="accordion.html">Accordion</a>,
|
||||
but you only move cards if they are separated by
|
||||
one or two cards, not if they are right next to
|
||||
each other.
|
|
@ -449,7 +449,7 @@ class GI:
|
|||
("Erik den Hollander", (344, 544,)),
|
||||
("Rick Holzgrafe", (756, 757,)),
|
||||
("Charles Jewell", (220, 309,)),
|
||||
("Michael Keller", (592,)),
|
||||
("Michael Keller", (592, 883,)),
|
||||
("Fred Lunde", (459,)),
|
||||
("Mark Masten", (811,)),
|
||||
("Albert Morehead and Geoffrey Mott-Smith", (25, 42, 48, 173, 282,
|
||||
|
@ -549,7 +549,7 @@ class GI:
|
|||
tuple(range(22217, 22219))),
|
||||
('fc-2.14', tuple(range(811, 827))),
|
||||
('fc-2.15', tuple(range(827, 855)) + tuple(range(22400, 22407))),
|
||||
('dev', tuple(range(855, 883)))
|
||||
('dev', tuple(range(855, 884)))
|
||||
)
|
||||
|
||||
# deprecated - the correct way is to or a GI.GT_XXX flag
|
||||
|
|
|
@ -267,11 +267,12 @@ class Accordion_Hint(AbstractHint):
|
|||
|
||||
|
||||
class Accordion_RowStack(PushPin_RowStack):
|
||||
ALLOWED_JUMPS = (1, 3)
|
||||
|
||||
def acceptsCards(self, from_stack, cards):
|
||||
if not self.cards:
|
||||
return False
|
||||
if abs(self.id - from_stack.id) not in (1, 3):
|
||||
if abs(self.id - from_stack.id) not in self.ALLOWED_JUMPS:
|
||||
return False
|
||||
c1, c2 = self.cards[-1], cards[0]
|
||||
if c1.rank == c2.rank:
|
||||
|
@ -332,6 +333,18 @@ class RelaxedAccordion_RowStack(Accordion2_RowStack):
|
|||
class RelaxedAccordion(Accordion2):
|
||||
RowStack_Class = RelaxedAccordion_RowStack
|
||||
|
||||
# ************************************************************************
|
||||
# * 23 Skidoo
|
||||
# ************************************************************************
|
||||
|
||||
|
||||
class TwoThreeSkidoo_RowStack(Accordion2_RowStack):
|
||||
ALLOWED_JUMPS = (2, 3)
|
||||
|
||||
|
||||
class TwoThreeSkidoo(Accordion2):
|
||||
RowStack_Class = TwoThreeSkidoo_RowStack
|
||||
|
||||
# ************************************************************************
|
||||
# * Accordion's Revenge
|
||||
# ************************************************************************
|
||||
|
@ -471,3 +484,5 @@ registerGame(GameInfo(811, AccordionsRevenge, "Accordion's Revenge",
|
|||
registerGame(GameInfo(816, Decade, "Decade",
|
||||
GI.GT_1DECK_TYPE, 1, 0, GI.SL_SKILL,
|
||||
altnames=('Ten Twenty Thirty')))
|
||||
registerGame(GameInfo(883, TwoThreeSkidoo, "23 Skidoo",
|
||||
GI.GT_1DECK_TYPE, 1, 0, GI.SL_SKILL))
|
||||
|
|
Loading…
Add table
Reference in a new issue