當前位置: 首頁>>代碼示例>>Python>>正文


Python AC_RowStack.getBottomImage方法代碼示例

本文整理匯總了Python中pysollib.stack.AC_RowStack.getBottomImage方法的典型用法代碼示例。如果您正苦於以下問題:Python AC_RowStack.getBottomImage方法的具體用法?Python AC_RowStack.getBottomImage怎麽用?Python AC_RowStack.getBottomImage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pysollib.stack.AC_RowStack的用法示例。


在下文中一共展示了AC_RowStack.getBottomImage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: createGame

# 需要導入模塊: from pysollib.stack import AC_RowStack [as 別名]
# 或者: from pysollib.stack.AC_RowStack import getBottomImage [as 別名]
    def createGame(self):

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

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

        # create stacks
        x = l.XM
        for i in range(2):
            y = l.YM+l.YS
            for j in range(4):
                s.foundations.append(SS_FoundationStack(x, y, self, suit=j))
                y += l.YS
            x += l.XS
        x, y = l.XM+2*l.XS, l.YM
        for i in range(8):
            stack = AC_RowStack(x, y, self, max_move=1)
            stack.getBottomImage = stack._getReserveBottomImage
            stack.CARD_XOFFSET, stack.CARD_YOFFSET = 0, 0
            s.rows.append(stack)
            x += l.XS
        x, y = l.XM+2*l.XS, l.YM+l.YS
        for i in range(8):
            stack = OpenStack(x, y, self, max_accept=0)
            stack.CARD_XOFFSET, stack.CARD_YOFFSET = 0, l.YOFFSET
            s.reserves.append(stack)
            x += l.XS
        s.talon = KingsdownEights_Talon(l.XM, l.YM, self, max_rounds=1)
        l.createText(s.talon, "se")

        # define stack-groups
        l.defaultStackGroups()
開發者ID:shlomif,項目名稱:PySolFC,代碼行數:37,代碼來源:tournament.py

示例2: createGame

# 需要導入模塊: from pysollib.stack import AC_RowStack [as 別名]
# 或者: from pysollib.stack.AC_RowStack import getBottomImage [as 別名]
    def createGame(self):

        l, s = Layout(self), self.s
        self.setSize(l.XM + 8*l.XS, l.YM + 4.5*l.YS)

        x, y = l.XM, l.YM
        for i in range(8):
            s.foundations.append(TheRedAndTheBlack_Foundation(x, y, self,
                                                              suit=i//2))
            x += l.XS
        x, y = l.XM+2*l.XS, l.YM+l.YS
        for i in range(4):
            stack = AC_RowStack(x, y, self, max_move=1)
            stack.getBottomImage = stack._getReserveBottomImage
            stack.CARD_YOFFSET = 0
            s.rows.append(stack)
            x += l.XS
        x, y = l.XM+2*l.XS, l.YM+2*l.YS
        for i in range(4):
            s.reserves.append(TheRedAndTheBlack_Reserve(x, y, self))
            x += l.XS
        x, y = l.XM+3*l.XS, l.YM+3.5*l.YS
        s.talon = WasteTalonStack(x, y, self, max_rounds=1)
        l.createText(s.talon, "sw")
        x += l.XS
        s.waste = WasteStack(x, y, self)
        l.createText(s.waste, "se")

        # define stack-groups
        l.defaultStackGroups()
開發者ID:shlomif,項目名稱:PySolFC,代碼行數:32,代碼來源:royalcotillion.py


注:本文中的pysollib.stack.AC_RowStack.getBottomImage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。