public List <PlayerView> GetHighestIntrinsic(DP dataPoint, short numberOfRecords) { SearchFilterHelper filterHelper = new SearchFilterHelper(_savegame, _rater); var playersToConstruct = filterHelper.OrderByDataPoint(dataPoint).Take(numberOfRecords).ToList(); var list = _displayHelper.ConstructPlayers(playersToConstruct, _rater).ToList(); return(list.OrderByDescending(x => x.Attributes.Tackling).ToList()); }
public List <PlayerView> GetScoutResults(ScoutingRequest request) { List <Func <Player, bool> > filters = new List <Func <Player, bool> >(); SearchFilterHelper filterHelper = new SearchFilterHelper(_savegame, _rater); filterHelper.CreateClubFilter(request, filters); filterHelper.CreatePositionFilter(request, filters); filterHelper.CreatePlayerBasedFilter(request, filters); filterHelper.CreateNationalityFilter(request, filters); filterHelper.CreateEUNationalityFilter(request, filters); filterHelper.CreateValueFilter(request, filters); filterHelper.CreateContractStatusFilter(request, filters); filterHelper.CreateAgeFilter(request, filters); var players = _savegame.Players; foreach (var filter in filters) { players = players.Where(x => filter(x)).ToList(); } return(ConstructPlayerByScoutingValueDesc(request.PlayerType, request.NumberOfResults, players)); }