本文整理汇总了Python中Settings.Settings.getMaxPay方法的典型用法代码示例。如果您正苦于以下问题:Python Settings.getMaxPay方法的具体用法?Python Settings.getMaxPay怎么用?Python Settings.getMaxPay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Settings.Settings
的用法示例。
在下文中一共展示了Settings.getMaxPay方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SetupGUI
# 需要导入模块: from Settings import Settings [as 别名]
# 或者: from Settings.Settings import getMaxPay [as 别名]
#.........这里部分代码省略.........
#set the payouts
for p, sp in zip(self.payoffs, self.settings.payouts):
p.SetValue(sp)
#set the combos
for c, sc in zip(self.allCombos, self.settings.combos):
for cc, ssc in zip(c, sc):
cc.SetStringSelection(ssc)
#set the overrides
for o, oo in zip(self.overrides, self.settings.override['odds']):
o.SetValue(oo)
#set the near miss odds
for nm, nmo in zip(self.nearMissOdds, self.settings.override['nearMiss']):
nm.SetValue(nmo)
#set the override/gambler's fallacy stuff
self.gfBox.SetValue(self.settings.gamblersFallacy)
self.overBox.SetValue(self.settings.override['engage'])
if hasattr(self.settings, 'slots'):
#set the symbol pads
nms = self.settings.slots.reels[0].nms
for pad, s in zip(self.nearMisses, self.settings.visibleSymbols):
if nms.has_key(s):
pad.SetValue(nms[s])
self.makeReels()
#set max and min pay
self.minPay.SetValue(str(self.settings.getMinPay()))
self.maxPay.SetValue(str(self.settings.getMaxPay()))
def makeReels(self):
reels = {}
for s in self.settings.visibleSymbols:
weights = self.weights[self.settings.visibleSymbols.index(s)]
for w in weights:
k = str(weights.index(w))
if reels.has_key(k):
reels[k][s] = w.GetValue()
else:
reels[k] = {s : w.GetValue()}
nms = {}
for s, nm in zip(self.settings.visibleSymbols, self.nearMisses):
nms[s] = nm.GetValue()
self.settings.slots = Slots(reels, self.settings.visibleSymbols, nms)
self.updateOdds()
def updateOdds(self):
self.settings.gamblersFallacy = self.gfBox.GetValue()
self.settings.override['engage'] = self.overBox.GetValue()
overrides = []
nearMisses = []
for o, nmo in zip(self.overrides, self.nearMissOdds):
overrides.append(o.GetValue())
nearMisses.append(nmo.GetValue())