1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-15 02:54:09 -04:00

Added 23 Skidoo game.

This commit is contained in:
Joe R 2023-01-14 13:05:42 -05:00
parent 1a5f73f59f
commit 26ff013153
3 changed files with 32 additions and 3 deletions

View 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.

View file

@ -449,7 +449,7 @@ class GI:
("Erik den Hollander", (344, 544,)), ("Erik den Hollander", (344, 544,)),
("Rick Holzgrafe", (756, 757,)), ("Rick Holzgrafe", (756, 757,)),
("Charles Jewell", (220, 309,)), ("Charles Jewell", (220, 309,)),
("Michael Keller", (592,)), ("Michael Keller", (592, 883,)),
("Fred Lunde", (459,)), ("Fred Lunde", (459,)),
("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,
@ -549,7 +549,7 @@ class GI:
tuple(range(22217, 22219))), tuple(range(22217, 22219))),
('fc-2.14', tuple(range(811, 827))), ('fc-2.14', tuple(range(811, 827))),
('fc-2.15', tuple(range(827, 855)) + tuple(range(22400, 22407))), ('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 # deprecated - the correct way is to or a GI.GT_XXX flag

View file

@ -267,11 +267,12 @@ class Accordion_Hint(AbstractHint):
class Accordion_RowStack(PushPin_RowStack): class Accordion_RowStack(PushPin_RowStack):
ALLOWED_JUMPS = (1, 3)
def acceptsCards(self, from_stack, cards): def acceptsCards(self, from_stack, cards):
if not self.cards: if not self.cards:
return False 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 return False
c1, c2 = self.cards[-1], cards[0] c1, c2 = self.cards[-1], cards[0]
if c1.rank == c2.rank: if c1.rank == c2.rank:
@ -332,6 +333,18 @@ class RelaxedAccordion_RowStack(Accordion2_RowStack):
class RelaxedAccordion(Accordion2): class RelaxedAccordion(Accordion2):
RowStack_Class = RelaxedAccordion_RowStack 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 # * Accordion's Revenge
# ************************************************************************ # ************************************************************************
@ -471,3 +484,5 @@ registerGame(GameInfo(811, AccordionsRevenge, "Accordion's Revenge",
registerGame(GameInfo(816, Decade, "Decade", registerGame(GameInfo(816, Decade, "Decade",
GI.GT_1DECK_TYPE, 1, 0, GI.SL_SKILL, GI.GT_1DECK_TYPE, 1, 0, GI.SL_SKILL,
altnames=('Ten Twenty Thirty'))) altnames=('Ten Twenty Thirty')))
registerGame(GameInfo(883, TwoThreeSkidoo, "23 Skidoo",
GI.GT_1DECK_TYPE, 1, 0, GI.SL_SKILL))