diff --git a/html-src/rules/yukoncells.html b/html-src/rules/yukoncells.html new file mode 100644 index 000000000..9fe817fe0 --- /dev/null +++ b/html-src/rules/yukoncells.html @@ -0,0 +1,12 @@ +

Yukon Cells

+

+Yukon type. 1 deck. No redeal. + +

Object

+

+Move all cards to the foundations. + +

Quick Description

+

+Just like Yukon, +but with two free cells. diff --git a/pysollib/gamedb.py b/pysollib/gamedb.py index 050875f8a..fbce63e00 100644 --- a/pysollib/gamedb.py +++ b/pysollib/gamedb.py @@ -576,7 +576,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, 925)) + tuple(range(11017, 11020)) + + ('dev', tuple(range(906, 926)) + tuple(range(11017, 11020)) + tuple(range(22303, 22311)) + tuple(range(22353, 22361))), ) diff --git a/pysollib/games/yukon.py b/pysollib/games/yukon.py index b01cdbed4..fc32522dd 100644 --- a/pysollib/games/yukon.py +++ b/pysollib/games/yukon.py @@ -706,7 +706,16 @@ def startGame(self): shallHighlightMatch = Game._shallHighlightMatch_AC -class YukonicPlague(Yukon): +# ************************************************************************ +# * Yukon Cells +# * Yukonic Plague +# ************************************************************************ + +class YukonCells(Yukon): + Reserve_Stack = ReserveStack + + RESERVES = 2 + RESERVE_TEXT = False def createGame(self): # create layout @@ -725,10 +734,14 @@ def createGame(self): if w2 + 13 * l.XOFFSET > w1: l.XOFFSET = int((w1 - w2) / 13) - reserve = OpenStack(x * 3, y, self) - reserve.CARD_XOFFSET = l.XOFFSET - l.createText(reserve, "sw") - s.reserves.append(reserve) + x2 = x * 3 + for i in range(self.RESERVES): + reserve = self.Reserve_Stack(x2, y, self) + reserve.CARD_XOFFSET = l.XOFFSET + if self.RESERVE_TEXT: + l.createText(reserve, "sw") + s.reserves.append(reserve) + x2 += l.XS y += l.YS for i in range(ROWS): @@ -738,7 +751,8 @@ def createGame(self): # Don't know why this is necessary for the Yukon layout. # But we should probably figure out how to get this to work # like other games. - self.setRegion(self.s.rows, (-999, -999, x - l.CW // 2, 999999)) + self.setRegion(self.s.rows + self.s.reserves, + (-999, -999, x - l.CW // 2, 999999)) # create foundations y = l.YM @@ -754,6 +768,13 @@ def createGame(self): self.setSize(l.XM + 8 * l.XS, h) l.defaultAll() + +class YukonicPlague(YukonCells): + Reserve_Stack = OpenStack + + RESERVES = 1 + RESERVE_TEXT = True + def startGame(self): for i in range(13): self.s.talon.dealRow(rows=self.s.reserves, frames=0) @@ -837,3 +858,5 @@ def startGame(self): GI.GT_YUKON, 1, 1, GI.SL_BALANCED)) registerGame(GameInfo(919, Dnieper, "Dnieper", GI.GT_SPIDER, 1, 0, GI.SL_BALANCED)) +registerGame(GameInfo(925, YukonCells, "Yukon Cells", + GI.GT_YUKON, 1, 0, GI.SL_BALANCED))