diff --git a/html-src/rules/smalltriangle.html b/html-src/rules/smalltriangle.html new file mode 100644 index 000000000..a5ed08ca3 --- /dev/null +++ b/html-src/rules/smalltriangle.html @@ -0,0 +1,13 @@ +

Small Triangle

+

+Gypsy type. 1 deck. No redeal. + +

Object

+

+Move all cards to the foundations. + + +

Quick Description

+

+Like Hypotenuse, but with one deck +and seven tableau piles. diff --git a/pysollib/gamedb.py b/pysollib/gamedb.py index 71f5ed64c..4fb35b3d8 100644 --- a/pysollib/gamedb.py +++ b/pysollib/gamedb.py @@ -565,7 +565,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, 912)) + tuple(range(11017, 11020))), + ('dev', tuple(range(906, 913)) + tuple(range(11017, 11020))), ) # deprecated - the correct way is to or a GI.GT_XXX flag diff --git a/pysollib/games/gypsy.py b/pysollib/games/gypsy.py index a2c0ddbc8..785d33d7f 100644 --- a/pysollib/games/gypsy.py +++ b/pysollib/games/gypsy.py @@ -549,21 +549,28 @@ class Hypotenuse(Gypsy): Layout_Method = staticmethod(Layout.klondikeLayout) RowStack_Class = KingAC_RowStack - def createGame(self): - Gypsy.createGame(self, rows=10, playcards=24) + def createGame(self, rows=10, playcards=24): + Gypsy.createGame(self, rows=rows, playcards=playcards) - def startGame(self, flip=0, reverse=1): - for i in range(1, 10): - self.s.talon.dealRow(rows=self.s.rows[:i], flip=0, frames=0) + def startGame(self, flip=0, rows=10): + for i in range(1, rows): + self.s.talon.dealRow(rows=self.s.rows[i:], flip=flip, frames=0) self._startAndDealRow() class EternalTriangle(Hypotenuse): - def startGame(self, flip=0, reverse=1): - for i in range(1, 10): - self.s.talon.dealRow(rows=self.s.rows[i:], frames=0) - self._startAndDealRow() + def startGame(self): + Hypotenuse.startGame(self, flip=1) + + +class SmallTriangle(Hypotenuse): + + def createGame(self): + Hypotenuse.createGame(self, rows=7, playcards=20) + + def startGame(self): + Hypotenuse.startGame(self, rows=7) class RightTriangle_Talon(OpenStack, DealRowTalonStack): @@ -1078,3 +1085,5 @@ def startGame(self): GI.GT_GYPSY, 1, 0, GI.SL_BALANCED)) registerGame(GameInfo(890, YeastDough, "Yeast Dough", GI.GT_GYPSY, 2, 0, GI.SL_MOSTLY_SKILL)) +registerGame(GameInfo(912, SmallTriangle, "Small Triangle", + GI.GT_GYPSY, 1, 0, GI.SL_BALANCED))