Exemplo n.º 1
0
    def createGame(self, rows=7):
        # create layout
        l, s = Layout(self), self.s

        # set window
        self.setSize(l.XM + max(8, rows) * l.XS, l.YM + 5 * l.YS)

        # create stacks
        for i in range(8):
            x, y, = l.XM + i * l.XS, l.YM
            s.foundations.append(
                DieRussische_Foundation(x,
                                        y,
                                        self,
                                        i // 2,
                                        max_move=0,
                                        max_cards=8))
        for i in range(rows):
            x, y, = l.XM + (2 * i + 8 - rows) * l.XS // 2, l.YM + l.YS
            s.rows.append(AC_RowStack(x, y, self))
        s.talon = DieBoeseSieben_Talon(l.XM,
                                       self.height - l.YS,
                                       self,
                                       max_rounds=2)
        l.createText(s.talon, 'ne')
        l.createRoundText(s.talon, 'se')

        # define stack-groups
        l.defaultStackGroups()
Exemplo n.º 2
0
    def createGame(self):

        # create layout
        l, s = Layout(self), self.s

        # set window
        self.setSize(l.XM + 9 * l.XS, l.YM + 2 * l.YS + 12 * l.YOFFSET)

        # create stacks
        x, y, = l.XM + l.XS, l.YM
        for i in range(8):
            s.foundations.append(
                DieRussische_Foundation(x, y, self, suit=i % 4, max_cards=8))
            x += l.XS
        x, y, = l.XM + l.XS, l.YM + l.YS
        for i in range(8):
            s.rows.append(AC_RowStack(x, y, self, max_move=1, max_accept=1))
            x += l.XS
        s.talon = RedealTalonStack(l.XM, l.YM + l.YS / 2, self, max_rounds=3)
        l.createRoundText(s.talon, 'nn')

        # define stack-groups
        l.defaultStackGroups()