def simulate_single_team_season(key_team, schedule):
  for game in schedule:
    if game[1] == "N":
      neutralsim(key_team, game[0])
    elif game[1] == "H":
      gamesim(key_team, game[0])
    elif game[1] == "A":
      gamesim(game[0], key_team)
  print key_team.wins, key_team.losses
  return key_team.wins, key_team.losses
Exemplo n.º 2
0
def seasonsim(team_dict, balanced):
    if balanced == True:
        for k in team_dict.keys():
            for ok in team_dict.keys():
                if k != ok:
                    result = gamesim(team_dict[k], team_dict[ok])
    else:
        for k in team_dict.keys():
            for o in team_dict[k].home_opponents:
                #print team_dict[k]
                #print team_dict[o]
                result = gamesim(team_dict[k], team_dict[o])

    return team_dict