本文整理汇总了Python中simulation.Simulation.setup方法的典型用法代码示例。如果您正苦于以下问题:Python Simulation.setup方法的具体用法?Python Simulation.setup怎么用?Python Simulation.setup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类simulation.Simulation
的用法示例。
在下文中一共展示了Simulation.setup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup
# 需要导入模块: from simulation import Simulation [as 别名]
# 或者: from simulation.Simulation import setup [as 别名]
def setup(self):
"""
Downloads necessary retrosheet data, initalizes bots, players, minBatAve,
susGamesDict
"""
if self.isSetup:
# self.didNotRepeatSetup = True # for testing
return
Simulation.setup(self) # download and parse retrosheet data
self.bots = self._create_bots() # create N bots
self.players = self.__calc__players(self.batAveYear, self.minPA) # create top P players
self.__initalize_player_hit_info_csvs() # initalize their hit info csv's
self.minBatAve = self.__set_min_bat_ave() # store resultant min bat ave
# self.susGamesDict = Researcher.get_sus_games_dict(self.get_sim_year())
for bot in self.bots:
bot.claim_mulligan() # claim your mulligan baby
self.isSetup = True