@@ -73,6 +73,7 @@ class EightOff(KingOnlyBakersGame):
7373 def createGame (self , rows = 8 , reserves = 8 ):
7474 # create layout
7575 l , s = Layout (self ), self .s
76+ decks = self .gameinfo .decks
7677
7778 # set window
7879 # (piles up to 16 cards are playable without
@@ -82,10 +83,11 @@ def createGame(self, rows=8, reserves=8):
8283 self .setSize (l .XM + maxrows * l .XS , l .YM + l .YS + h + l .YS )
8384
8485 # create stacks
85- x , y = l .XM + (maxrows - 4 ) * l .XS // 2 , l .YM
86+ x , y = l .XM + (maxrows - ( 4 * decks )) * l .XS // 2 , l .YM
8687 for i in range (4 ):
87- s .foundations .append (SS_FoundationStack (x , y , self , i ))
88- x = x + l .XS
88+ for j in range (decks ):
89+ s .foundations .append (SS_FoundationStack (x , y , self , i ))
90+ x = x + l .XS
8991 x , y = l .XM + (maxrows - rows )* l .XS // 2 , y + l .YS
9092 for i in range (rows ):
9193 s .rows .append (self .RowStack_Class (x , y , self ))
@@ -111,6 +113,17 @@ def startGame(self):
111113 self .s .talon .dealRow (rows = [r [0 ], r [2 ], r [4 ], r [6 ]])
112114
113115
116+ class DoubleEightOff (EightOff ):
117+
118+ def createGame (self , rows = 8 , reserves = 8 ):
119+ EightOff .createGame (self , rows = 12 )
120+
121+ def startGame (self ):
122+ self ._startDealNumRows (7 )
123+ self .s .talon .dealRow ()
124+ self .s .talon .dealRow (rows = self .s .reserves )
125+
126+
114127# ************************************************************************
115128# * Seahaven Towers (Baker's Game in a different layout)
116129# ************************************************************************
@@ -328,3 +341,5 @@ def fillStack(self, stack):
328341registerGame (GameInfo (713 , Flipper , "Flipper" ,
329342 GI .GT_FREECELL | GI .GT_OPEN | GI .GT_ORIGINAL , 1 , 0 ,
330343 GI .SL_MOSTLY_SKILL ))
344+ registerGame (GameInfo (985 , DoubleEightOff , "Double Eight Off" ,
345+ GI .GT_FREECELL | GI .GT_OPEN , 2 , 0 , GI .SL_MOSTLY_SKILL ))
0 commit comments