本文整理汇总了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()
示例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()