예제 #1
0
        public MasterGameYearViewModel(MasterSubGame masterSubGame, MasterGameYear masterGame, IClock clock)
        {
            MasterGameID                 = masterSubGame.MasterGameID;
            Year                         = masterGame.Year;
            GameName                     = masterSubGame.GameName;
            EstimatedReleaseDate         = masterSubGame.EstimatedReleaseDate;
            SortableEstimatedReleaseDate = masterSubGame.SortableEstimatedReleaseDate;
            ReleaseDate                  = masterSubGame.ReleaseDate;
            IsReleased                   = masterSubGame.IsReleased(clock);
            WillRelease                  = masterGame.WillRelease();
            CriticScore                  = masterSubGame.CriticScore;
            AveragedScore                = false;
            EligibilitySettings          = new EligibilitySettingsViewModel(masterGame.MasterGame.EligibilitySettings, false);
            OpenCriticID                 = masterSubGame.OpenCriticID;
            SubGames                     = null;

            PercentStandardGame         = masterGame.PercentStandardGame;
            PercentCounterPick          = masterGame.PercentCounterPick;
            EligiblePercentStandardGame = masterGame.EligiblePercentStandardGame;
            EligiblePercentCounterPick  = masterGame.EligiblePercentCounterPick;
            AverageDraftPosition        = masterGame.AverageDraftPosition;
            HypeFactor                   = masterGame.HypeFactor;
            DateAdjustedHypeFactor       = masterGame.DateAdjustedHypeFactor;
            ProjectedFantasyPoints       = masterGame.GetAlwaysProjectedFantasyPoints(new StandardScoringSystem(), false);
            ProjectedOrRealFantasyPoints = masterGame.GetProjectedOrRealFantasyPoints(new StandardScoringSystem(), false, clock);
            AddedTimestamp               = masterGame.MasterGame.AddedTimestamp;
        }
예제 #2
0
        public MasterGameYearViewModel(MasterGameYear masterGame, IClock clock)
        {
            MasterGameID             = masterGame.MasterGame.MasterGameID;
            Year                     = masterGame.Year;
            GameName                 = masterGame.MasterGame.GameName;
            EstimatedReleaseDate     = masterGame.MasterGame.EstimatedReleaseDate;
            MinimumReleaseDate       = masterGame.MasterGame.MinimumReleaseDate;
            MaximumReleaseDate       = masterGame.MasterGame.GetDefiniteMaximumReleaseDate();
            EarlyAccessReleaseDate   = masterGame.MasterGame.EarlyAccessReleaseDate;
            InternationalReleaseDate = masterGame.MasterGame.InternationalReleaseDate;
            ReleaseDate              = masterGame.MasterGame.ReleaseDate;
            IsReleased               = masterGame.MasterGame.IsReleased(clock.GetCurrentInstant());
            WillRelease              = masterGame.WillRelease();
            CriticScore              = masterGame.MasterGame.CriticScore;
            AveragedScore            = masterGame.MasterGame.AveragedScore;
            OpenCriticID             = masterGame.MasterGame.OpenCriticID;
            SubGames                 = masterGame.MasterGame.SubGames.Select(x => new MasterGameYearViewModel(x, masterGame, clock)).ToList();
            Tags                     = masterGame.MasterGame.Tags.Select(x => x.Name).ToList();
            BoxartFileName           = masterGame.MasterGame.BoxartFileName;
            PercentStandardGame      = masterGame.PercentStandardGame;
            PercentCounterPick       = masterGame.PercentCounterPick;

            if (masterGame.MasterGame.EligibilityChanged)
            {
                EligiblePercentStandardGame = masterGame.PercentStandardGame;
                EligiblePercentCounterPick  = masterGame.PercentCounterPick;
            }
            else
            {
                EligiblePercentStandardGame = masterGame.EligiblePercentStandardGame;
                EligiblePercentCounterPick  = masterGame.EligiblePercentCounterPick;
            }

            AverageDraftPosition         = masterGame.AverageDraftPosition;
            HypeFactor                   = masterGame.HypeFactor;
            DateAdjustedHypeFactor       = masterGame.DateAdjustedHypeFactor;
            ProjectedFantasyPoints       = masterGame.GetAlwaysProjectedFantasyPoints(new StandardScoringSystem(), false);
            ProjectedOrRealFantasyPoints = masterGame.GetProjectedOrRealFantasyPoints(new StandardScoringSystem(), false, clock);
            AddedTimestamp               = masterGame.MasterGame.AddedTimestamp;
        }