本文整理汇总了Python中team.Team.stats_tracker方法的典型用法代码示例。如果您正苦于以下问题:Python Team.stats_tracker方法的具体用法?Python Team.stats_tracker怎么用?Python Team.stats_tracker使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类team.Team
的用法示例。
在下文中一共展示了Team.stats_tracker方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Team
# 需要导入模块: from team import Team [as 别名]
# 或者: from team.Team import stats_tracker [as 别名]
home = Team()
away = Team()
home.set_opponent(away)
away.set_opponent(home)
game = Game()
# TODO: Better design?
for i in range(len(pbp_lines)):
line = pbp_lines[i]
if start:
if filter(line):
possession = line
side = which_team(possession)
if side == 1:
score, summary = clean_up(line)
home.stats_tracker(score + " " + summary)
elif side == 2:
score, summary = clean_up(line)
away.stats_tracker(score + " " + summary)
else:
print 'should never be here?'
#print score, summary
#continue
if "<th>Time</th>" in line and start == 0:
away.get_teamname(pbp_lines[i+1])
home.get_teamname(pbp_lines[i+3])
print away.team_name, "VS", home.team_name
if "Start of 1st quarter" in line:
start = 1