本文整理匯總了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: