本文整理匯總了Python中pysollib.stack.AC_RowStack.CARD_XOFFSET方法的典型用法代碼示例。如果您正苦於以下問題:Python AC_RowStack.CARD_XOFFSET方法的具體用法?Python AC_RowStack.CARD_XOFFSET怎麽用?Python AC_RowStack.CARD_XOFFSET使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pysollib.stack.AC_RowStack
的用法示例。
在下文中一共展示了AC_RowStack.CARD_XOFFSET方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: createGame
# 需要導入模塊: from pysollib.stack import AC_RowStack [as 別名]
# 或者: from pysollib.stack.AC_RowStack import CARD_XOFFSET [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 CARD_XOFFSET [as 別名]
def createGame(self, max_rounds=2):
l, s = Layout(self), self.s
self.setSize(l.XM+8*l.XS, l.YM+4*l.YS)
self.base_card = None
i = 0
for x, y in ((l.XM, l.YM),
(l.XM+7*l.XS, l.YM),
(l.XM, l.YM+3*l.YS),
(l.XM+7*l.XS, l.YM+3*l.YS),
):
s.foundations.append(
SS_FoundationStack(x, y, self, suit=i, mod=13))
i += 1
y = l.YM+l.YS
for i in range(2):
x = l.XM+l.XS
for j in range(6):
stack = AC_RowStack(x, y, self, max_move=1, mod=13)
stack.CARD_XOFFSET, stack.CARD_YOFFSET = 0, 0
s.rows.append(stack)
x += l.XS
y += l.YS
x, y = l.XM+3*l.XS, l.YM
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')
l.defaultStackGroups()