本文整理汇总了Python中Simulation.simulateOld方法的典型用法代码示例。如果您正苦于以下问题:Python Simulation.simulateOld方法的具体用法?Python Simulation.simulateOld怎么用?Python Simulation.simulateOld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Simulation
的用法示例。
在下文中一共展示了Simulation.simulateOld方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: handlePerformedActionShow
# 需要导入模块: import Simulation [as 别名]
# 或者: from Simulation import simulateOld [as 别名]
def handlePerformedActionShow(words, writeFile):
global opponentName
global numBoardCards
global preflopBets
global postflopBets
global turnBets
global riverBets
global boardCards
global d
if(words[5] == opponentName):
opponentHand = []
for card in words[1:5]:
opponentHand.append(parseCard(card))
preflopRating = Pokerini.pokeriniLookup(opponentHand, d)
writeFile.write(str(preflopRating)+","+','.join(preflopBets))
writeFile.write('\n')
if(numBoardCards >= 3):
postflopRanking = Simulation.simulateOld(opponentHand, boardCards[0:3], 3, 100)
writeFile.write(str(postflopRanking)+","+','.join(postflopBets))
writeFile.write('\n')
if(numBoardCards >= 4):
turnRanking = Simulation.simulateOld(opponentHand, boardCards[0:4], 4, 100)
writeFile.write(str(turnRanking)+","+','.join(turnBets))
writeFile.write('\n')
if(numBoardCards == 5):
riverRanking = Simulation.simulateOld(opponentHand, boardCards[0:5], 5, 100)
writeFile.write(str(riverRanking)+","+','.join(riverBets))
writeFile.write('\n')
示例2: updateHandRanking
# 需要导入模块: import Simulation [as 别名]
# 或者: from Simulation import simulateOld [as 别名]
def updateHandRanking(self):
if(self.cardsChanged == True):
if(self.numBoardCards == 0): #preflop
self.pokeriniRank = Pokerini.pokeriniLookup(self.myHand, pokeriniDict)
self.calculatePreflopBetLimit()
if(self.numBoardCards >= 3):#postflop
#self.simulationWinChance = Simulation.simulate(self.myHand, self.boardCards, self.numBoardCards, 200, handEvalDict, translationDict)
self.simulationWinChance = Simulation.simulateOld(self.myHand, self.boardCards, self.numBoardCards, self.numSimulations)
self.cardsChanged = False