Skip to content

Commit 50e7d65

Browse files
committed
Added Juvenile game.
1 parent 224d21a commit 50e7d65

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

html-src/rules/juvenile.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<h1>Juvenile</h1>
2+
<p>
3+
Pairing game type. 2 decks. No redeal.
4+
5+
<h3>Object</h3>
6+
<p>
7+
Discard all pairs of cards that add up to fourteen in rank.
8+
9+
<h3>Quick Description</h3>
10+
<p>
11+
Like <a href="doublefourteen.html">Double Fourteen</a>,
12+
but with a different layout consisting of one pile of eight
13+
cards, and sixteen piles of six cards.
14+
15+
<h3>Notes</h3>
16+
<p>
17+
<i>Autodrop</i> is disabled for this game.

pysollib/gamedb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ def _callback(gi, gt=game_type):
592592
('fc-2.20', tuple(range(855, 897))),
593593
('fc-2.21', tuple(range(897, 900)) + tuple(range(11014, 11017)) +
594594
tuple(range(13160, 13163)) + (16682,)),
595-
('dev', tuple(range(906, 935)) + tuple(range(11017, 11020)) +
595+
('dev', tuple(range(906, 936)) + tuple(range(11017, 11020)) +
596596
tuple(range(5600, 5624)) + tuple(range(18000, 18004)) +
597597
tuple(range(22303, 22311)) + tuple(range(22353, 22361))),
598598
)

pysollib/games/montecarlo.py

+15
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ def shallHighlightMatch(self, stack1, card1, stack2, card2):
506506
# ************************************************************************
507507
# * Fourteen
508508
# * Double Fourteen
509+
# * Juvenile
509510
# ************************************************************************
510511

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

578579

580+
class Juvenile(DoubleFourteen):
581+
582+
def startGame(self):
583+
self.startDealSample()
584+
for i in range(2):
585+
self.s.talon.dealRow(rows=[self.s.rows[0]], frames=0)
586+
for i in range(5):
587+
self.s.talon.dealRow(rows=self.s.rows[:17], frames=0)
588+
self.s.talon.dealRow(rows=self.s.rows[:17])
589+
590+
579591
# ************************************************************************
580592
# * Nestor
581593
# * Double Nestor
@@ -1165,3 +1177,6 @@ def isNeighbour(self, stack1, stack2):
11651177
GI.GT_1DECK_TYPE, 1, 0, GI.SL_BALANCED))
11661178
registerGame(GameInfo(923, Crispy, "Crispy",
11671179
GI.GT_1DECK_TYPE, 1, 0, GI.SL_BALANCED))
1180+
registerGame(GameInfo(935, Juvenile, "Juvenile",
1181+
GI.GT_PAIRING_TYPE | GI.GT_OPEN, 2, 0,
1182+
GI.SL_MOSTLY_LUCK))

0 commit comments

Comments
 (0)