示例#1
0
        public StatsModelView(League _league)
        {
            currentSeason = _league.GetCurrentSeason();
            var Allplayers = _league.Seasons.GetActiveSeasons().First().GetLivePlayers();
            PlayerCount = Allplayers.Count();
            ThisWeek = currentSeason.GetCurrentWeekSeason();
            if(ThisWeek != null){
                PlayerPredictions = ThisWeek.GetPlayerPredications();

                PlayerPredictionsCount = PlayerPredictions.Count();
                MatchesCount = ThisWeek.Matches.Count();
                AwaitingPredictions = (PlayerCount * MatchesCount) - PlayerPredictionsCount;

                PlayersStats = Allplayers.Select(p => CreateRow(p, MatchesCount)).ToArray();
            }
        }