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

Added Yukon Cells game.

This commit is contained in:
Joe R 2023-10-02 17:24:51 -04:00
parent c027e6ca0e
commit e858b38de1
3 changed files with 42 additions and 7 deletions

View file

@ -0,0 +1,12 @@
<h1>Yukon Cells</h1>
<p>
Yukon type. 1 deck. No redeal.
<h3>Object</h3>
<p>
Move all cards to the foundations.
<h3>Quick Description</h3>
<p>
Just like <a href="yukon.html">Yukon</a>,
but with two free cells.

View file

@ -576,7 +576,7 @@ class GI:
('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))),
)

View file

@ -706,7 +706,16 @@ class Wave(Game):
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 @@ class YukonicPlague(Yukon):
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 @@ class YukonicPlague(Yukon):
# 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 @@ class YukonicPlague(Yukon):
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 @@ registerGame(GameInfo(914, Canberra, "Canberra",
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))