Пример #1
0
 private static void UpdateGamesBack(StandingsGroupModel groupModel)
 {
     var gbDiff = groupModel.Teams.Max(t => t.GamesBack);
     groupModel.Teams.ForEach(t =>
                              {
                                  t.GamesBack -= gbDiff;
                              });
 }
Пример #2
0
        private static List<StandingsGroupModel> GetLeagueStandingsTeamModels(List<StandingsTeamModel> teams)
        {
            var allTeamsModel = new StandingsGroupModel
                                {
                                    Name = "All Teams",
                                    Teams = GetTeamsForGroup(teams)
                                };

            UpdateGamesBack(allTeamsModel);

            return new List<StandingsGroupModel> {allTeamsModel};
        }