public decimal GetRoyaleGameCost()
        {
            decimal projectedPoints = ScoringSystem.GetRoyaleScoringSystem().GetPointsForScore(Convert.ToDecimal(LinearRegressionHypeFactor), false);

            projectedPoints *= 1.5m;
            if (projectedPoints < 2m)
            {
                projectedPoints = 2m;
            }

            return(projectedPoints);
        }
Esempio n. 2
0
        public decimal?CalculateFantasyPoints(IClock clock)
        {
            if (!MasterGame.MasterGame.IsReleased(clock.GetCurrentInstant()))
            {
                return(0m);
            }
            var basePoints = MasterGame.CalculateFantasyPoints(ScoringSystem.GetRoyaleScoringSystem(), false, clock, true);

            if (!basePoints.HasValue)
            {
                return(null);
            }

            var extraPoints    = basePoints * AdvertisingMoney * 0.05m;
            var modifiedPoints = basePoints + extraPoints;

            return(modifiedPoints);
        }
        public async Task <IReadOnlyList <MasterGameYear> > GetMasterGamesForYearQuarter(YearQuarter yearQuarter)
        {
            IEnumerable <MasterGameYear> masterGameYears = await _masterGameRepo.GetMasterGameYears(yearQuarter.Year, true);

            masterGameYears = masterGameYears.Where(x => !x.MasterGame.ReleaseDate.HasValue || x.MasterGame.ReleaseDate >= yearQuarter.FirstDateOfQuarter);
            masterGameYears = masterGameYears.OrderByDescending(x => x.GetProjectedOrRealFantasyPoints(ScoringSystem.GetRoyaleScoringSystem(), false, _clock));

            return(masterGameYears.ToList());
        }