예제 #1
0
 public void TestGS4Scorer()
 {
     var player = new NFLPlayer("MANNPE01");
      var week = new NFLWeek("2014", 1);
      var sut = new GS4Scorer(week);
      var score = sut.RatePlayer(player, week);
      Assert.IsTrue(score.Equals(12.0M));
 }
예제 #2
0
        public void TallyGridStatsFor(NflTeam nflTeam, bool announceIt)
        {
            var theWeek = new NFLWeek(Season, WeekNo);

             var scorer = new GS4Scorer(theWeek) { AnnounceIt = announceIt, ScoresOnly = true };
             var playerList = LoadLineupPlayers(nflTeam.TeamCode == HomeTeam ? HomeTeam : AwayTeam);
             foreach (var nflPlayer in playerList)
             {
            if (!nflPlayer.IsFantasyPlayer()) continue;
            var qty = scorer.RatePlayer(nflPlayer, theWeek);
            if (qty > 0.0M)
            {
               GridStatsList.Add(new GridStatsOutput(
                                 Season,
                                 Week,
                                 nflPlayer.PlayerCode,
                                 qty,
                                 Opponent(nflTeam.TeamCode)));
            }
             }
        }