Esempio n. 1
0
 private void TallyPredictions(
     ScoreCard scorecard,
     NFLPlayer player,
     List <PlayerGameMetrics> season)
 {
     scorecard.TotalPoints = TotalPredictonFor(
         season,
         player);
     for (int w = 1; w < 17; w++)
     {
         scorecard.Week[w]
             = PredictonFor(w, season, player)
               * player.HealthRating()
               * player.AgeRating();
         TotalScoreCard.Week[w]     += scorecard.Week[w];
         TotalScoreCard.TotalPoints += scorecard.Week[w];
     }
 }
Esempio n. 2
0
        private static decimal PredictPlayer(
            NFLPlayer player,
            PlayerGameMetrics pgm)
        {
            var newbieModifier = player.NewbieModifier();

            if (newbieModifier != 1.0M)
            {
                newbieModifier = 1.0M - newbieModifier;
            }
            var healthModifier = player.HealthRating();
            var ageModifier    = player.AgeRating();
            var predictedPts   = pgm.CalculateProjectedFantasyPoints(
                player)
                                 * newbieModifier
                                 * healthModifier
                                 * ageModifier;

            return(predictedPts);
        }
Esempio n. 3
0
        private static decimal AdjustedPoints(
            NFLPlayer p,
            decimal totPoints)
        {
            var hr = p.HealthRating();
            var ar = p.AgeRating();
            var sm = p.ScoreModifier();
            var nm = p.NewbieModifier();

            if (p.PlayerName.Equals("Mark Ingram"))
            {
                Console.WriteLine("TestPlayer check");
            }
            var adjPoints =
                totPoints
                * hr
                * ar
                * sm
                * nm;

            return(adjPoints);
        }