Skip to content

Commit

Permalink
Added Juvenile game.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeraz committed Dec 1, 2023
1 parent 224d21a commit 50e7d65
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
17 changes: 17 additions & 0 deletions html-src/rules/juvenile.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<h1>Juvenile</h1>
<p>
Pairing game type. 2 decks. No redeal.

<h3>Object</h3>
<p>
Discard all pairs of cards that add up to fourteen in rank.

<h3>Quick Description</h3>
<p>
Like <a href="doublefourteen.html">Double Fourteen</a>,
but with a different layout consisting of one pile of eight
cards, and sixteen piles of six cards.

<h3>Notes</h3>
<p>
<i>Autodrop</i> is disabled for this game.
2 changes: 1 addition & 1 deletion pysollib/gamedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def _callback(gi, gt=game_type):
('fc-2.20', tuple(range(855, 897))),
('fc-2.21', tuple(range(897, 900)) + tuple(range(11014, 11017)) +
tuple(range(13160, 13163)) + (16682,)),
('dev', tuple(range(906, 935)) + tuple(range(11017, 11020)) +
('dev', tuple(range(906, 936)) + tuple(range(11017, 11020)) +
tuple(range(5600, 5624)) + tuple(range(18000, 18004)) +
tuple(range(22303, 22311)) + tuple(range(22353, 22361))),
)
Expand Down
15 changes: 15 additions & 0 deletions pysollib/games/montecarlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ def shallHighlightMatch(self, stack1, card1, stack2, card2):
# ************************************************************************
# * Fourteen
# * Double Fourteen
# * Juvenile
# ************************************************************************

class Fourteen_RowStack(MonteCarlo_RowStack):
Expand Down Expand Up @@ -576,6 +577,17 @@ def startGame(self):
self.s.talon.dealRow(rows=self.s.rows[:14])


class Juvenile(DoubleFourteen):

def startGame(self):
self.startDealSample()
for i in range(2):
self.s.talon.dealRow(rows=[self.s.rows[0]], frames=0)
for i in range(5):
self.s.talon.dealRow(rows=self.s.rows[:17], frames=0)
self.s.talon.dealRow(rows=self.s.rows[:17])


# ************************************************************************
# * Nestor
# * Double Nestor
Expand Down Expand Up @@ -1165,3 +1177,6 @@ def isNeighbour(self, stack1, stack2):
GI.GT_1DECK_TYPE, 1, 0, GI.SL_BALANCED))
registerGame(GameInfo(923, Crispy, "Crispy",
GI.GT_1DECK_TYPE, 1, 0, GI.SL_BALANCED))
registerGame(GameInfo(935, Juvenile, "Juvenile",
GI.GT_PAIRING_TYPE | GI.GT_OPEN, 2, 0,
GI.SL_MOSTLY_LUCK))

0 comments on commit 50e7d65

Please sign in to comment.