Ejemplo n.º 1
0
        public IEnumerable <Weight> GetOverallScoresForAllHeroes(GetOverallRankingsForAllHeroesRequest request)
        {
            var scores = Calculator.GetOverallScoresForAllHeroes(Calculator.Heroes.Where(h => request.Opponents.Contains(h.Name)),
                                                                 Calculator.Heroes.Where(h => request.Teammates.Contains(h.Name)),
                                                                 request.RelativeSynergyWeight);

            return(scores);
        }
        public IEnumerable <Weight> GetOverallScoresForAllHeroes(GetOverallRankingsForAllHeroesRequest request)
        {
            var enemyTeam     = request.Opponents.Select(o => Calculator.Heroes.Single(h => h.Name == o));
            var team          = request.Teammates.Select(t => Calculator.Heroes.Single(h => h.Name == t));
            var objectiveType = Calculator.ObjectiveTypes.Single(o => o.Id == request.ObjectiveGameType);

            var scores = Calculator.GetOverallScoresForAllHeroes(enemyTeam, team, objectiveType);

            return(scores);
        }