Ejemplo n.º 1
0
 public void TestDefensiveScoringCalculator()
 {
     var week = new NFLWeek( seasonIn: "2016", weekIn: "13" );
      var team = new NflTeam( "KC" );
      var game = new NFLGame( gameKey: "2016:13-B" );  // KC @ AF
      var sut = new DefensiveScoringCalculator( week, offset:0 );
      sut.Calculate( team: team, game: game );
      Assert.AreEqual( expected: 11.0M, actual: team.FantasyPoints );
 }
Ejemplo n.º 2
0
        public decimal DefensiveFantasyPtsFor( string teamCode )
        {
            if ( !Played() ) return 0.0M;

             NflTeam team;
             if ( IsAway( teamCode ) )
            team = AwayNflTeam;
             else
            team = HomeNflTeam;

             if ( GameWeek == null ) GameWeek = new NFLWeek( Season, Week );
             var calculator = new DefensiveScoringCalculator( GameWeek, offset: 0 );
             calculator.Calculate( team: team, game: this );
             return team.FantasyPoints;
        }