Ejemplo n.º 1
0
        public virtual ActionResult ShowRecentNemesisChanges()
        {
            var recentNemesisChanges           = nemesisHistoryRetriever.GetRecentNemesisChanges(NUMBER_OF_RECENT_NEMESIS_CHANGES_TO_RETRIEVE);
            var recentNemesisChangesViewModels = nemesisChangeViewModelBuilder.Build(recentNemesisChanges).ToList();

            return(View(MVC.Player.Views.RecentNemesisChanges, recentNemesisChangesViewModels));
        }
Ejemplo n.º 2
0
        public virtual ActionResult Index()
        {
            List <TopPlayer>          topPlayers          = playerSummaryBuilder.GetTopPlayers(NUMBER_OF_TOP_PLAYERS_TO_SHOW);
            List <TopPlayerViewModel> topPlayerViewModels = topPlayers.Select(
                topPlayer => this.topPlayerViewModelBuilder.Build(topPlayer)).ToList();

            List <PublicGameSummary> publicGameSummaries = playedGameRetriever
                                                           .GetRecentPublicGames(NUMBER_OF_RECENT_PUBLIC_GAMES_TO_SHOW);

            List <NemesisChange> nemesisChanges = nemesisHistoryRetriever.GetRecentNemesisChanges(NUMBER_OF_RECENT_NEMESIS_CHANGES_TO_SHOW);

            var nemesisChangeViewModels = nemesisChangeViewModelBuilder.Build(nemesisChanges);

            var topGamingGroups = gamingGroupRetriever.GetTopGamingGroups(NUMBER_OF_TOP_GAMING_GROUPS_TO_SHOW);

            var topGamingGroupViewModels = topGamingGroups.Select(Mapper.Map <TopGamingGroupSummary, TopGamingGroupSummaryViewModel>).ToList();

            HomeIndexViewModel homeIndexViewModel = new HomeIndexViewModel()
            {
                TopPlayers           = topPlayerViewModels,
                RecentPublicGames    = publicGameSummaries,
                RecentNemesisChanges = nemesisChangeViewModels,
                TopGamingGroups      = topGamingGroupViewModels
            };

            return(View(MVC.Home.Views.Index, homeIndexViewModel));
        }