本文整理汇总了Python中team.Team.addGame方法的典型用法代码示例。如果您正苦于以下问题:Python Team.addGame方法的具体用法?Python Team.addGame怎么用?Python Team.addGame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类team.Team
的用法示例。
在下文中一共展示了Team.addGame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: len
# 需要导入模块: from team import Team [as 别名]
# 或者: from team.Team import addGame [as 别名]
for line in f:
gam = line.split("\t")
if curseason is not gam[0]:
if len(seas.keys()) > 0:
seasons.append(deepcopy(seas))
seas.clear()
curseason = gam[0]
if gam[2] in seas:
team1 = seas[gam[2]]
else:
team1 = Team(names[gam[2]])
if gam[4] in seas:
team2 = seas[gam[4]]
else:
team2 = Team(names[gam[4]])
team1.addGame(Game(gam[4], gam[3], gam[5]))
team2.addGame(Game(gam[2], gam[5], gam[3]))
seas[gam[2]] = deepcopy(team1)
seas[gam[4]] = deepcopy(team2)
seasons.append(deepcopy(seas))
# seas.clear()
for i in range(2, len(seasons)):
seaso = seasons[i]
q = open(str(1996 + i) + "se.txt", "r")
teamStats = dict()
for lines in q:
stat = lines.split("\t")
teamStats[stat[1]] = lines
for team in seaso.keys():
if team not in teamStats: