def createGame(self): l, s = Layout(self), self.s self.setSize(l.XM+8.5*l.XS, l.YM+4*l.YS) y = l.YM suit = 0 for i in (0, 1, 3, 4): x = l.XM+(2+i)*l.XS s.foundations.append(SS_FoundationStack(x, y, self, suit=suit)) suit += 1 x, y = l.XM+4*l.XS, l.YM for i in range(4): s.foundations.append(SS_FoundationStack(x, y, self, suit=i, base_rank=KING, dir=-1)) y += l.YS for i, j in ((0, 0), (1, 0), (2, 0), (5, 0), (6, 0), (7, 0), (0, 1), (1, 1), (2, 1), (5, 1), (6, 1), (7, 1), ): x, y = l.XM+(0.5+i)*l.XS, l.YM+(1.5+j)*l.YS stack = BasicRowStack(x, y, self, max_accept=0) s.rows.append(stack) stack.CARD_YOFFSET = 0 x, y = l.XM, l.YM s.talon = DealRowRedealTalonStack(x, y, self, max_rounds=3) l.createText(s.talon, 'se') l.createRoundText(s.talon, 'ne') l.defaultStackGroups()
def createGame(self, max_rounds=2): l, s = Layout(self), self.s self.setSize(l.XM + 10 * l.XS, l.YM + 5 * l.YS) lay = ( (1.5, 0), (2.5, 0.3), (3, 1.3), (2.5, 2.3), (1.5, 2.6), (0.5, 2.3), (0, 1.3), (0.5, 0.3), ) suit = 0 x0, y0 = l.XM + l.XS, l.YM for xx, yy in lay: x, y = x0 + xx * l.XS, y0 + yy * l.YS s.foundations.append( SS_FoundationStack(x, y, self, suit=suit // 2, base_rank=6, max_cards=7)) suit += 1 suit = 0 x0, y0 = l.XM + 5 * l.XS, l.YM for xx, yy in lay: x, y = x0 + xx * l.XS, y0 + yy * l.YS s.foundations.append( SS_FoundationStack(x, y, self, suit=suit // 2, base_rank=5, dir=-1, max_cards=6)) suit += 1 x, y = l.XM, l.YM + 4 * l.YS for i in range(8): stack = BasicRowStack(x, y, self) stack.CARD_YOFFSET = 0 s.rows.append(stack) x += l.XS x += l.XS s.talon = DealRowRedealTalonStack(x, y, self, max_rounds=2) l.createText(s.talon, 'nw') l.createRoundText(s.talon, 'sw') l.defaultStackGroups()
def canDealCards(self): return DealRowRedealTalonStack.canDealCards( self, rows=self.game.s.wastes)
def canDealCards(self): return DealRowRedealTalonStack.canDealCards(self, rows=self.game.s.wastes)
def _redeal(self, rows=None, reverse=False, frames=0): return DealRowRedealTalonStack._redeal(self, rows=rows, reverse=reverse, frames=3)