Ejemplo n.º 1
0
 private static string OpponentDefence( NFLPlayer p, NFLGame game )
 {
     if (game == null) return "BYE";
      var opponent = game.OpponentTeam( p.TeamCode );
      return opponent == null ? "BYE" : opponent.DefensiveRating( p.PlayerCat );
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Segment II (Weeks 5-8)
        /// Pointer Nine: (p73-4)
        ///   Large Point Swings.
        ///     As in the first four games, I use the 50-point swing model.  In other words,
        ///     if Team A's margin of win and Team B's margin of loss the previous week add up
        ///     to 50 points or more, I am looking to bet Team B this week.
        /// </summary>
        /// <param name="team"></param>
        /// <param name="upcomingGame"></param>
        /// <returns></returns>
        public static bool LargePointSwing( NflTeam team, NFLGame upcomingGame )
        {
            bool largePointSwing = false;
             NFLGame prevGame = team.PreviousGame( upcomingGame.GameDate );
             if ( prevGame.Lost( team ) )
             {
            NflTeam opponent = upcomingGame.OpponentTeam( team.TeamCode );
            NFLGame prevOpponentGame = opponent.PreviousGame( upcomingGame.GameDate );
            if ( prevOpponentGame.Won( opponent ) )
            {
               int margin = prevGame.MarginOfVictory() + prevOpponentGame.MarginOfVictory();
               if ( margin >= KLargePointSwingMargin )
                  largePointSwing = true;
            }
             }

             return largePointSwing;
        }
Ejemplo n.º 3
0
 private static string OppUnitRating(NFLGame g, string playerTeamCode, string playerCategory)
 {
     var unitRate = "X";
      var rating = g.OpponentTeam(playerTeamCode).Ratings;
      switch (playerCategory)
      {
     case "1":
        unitRate = rating.Substring(5, 1);
        break;
     case "2":
        unitRate = rating.Substring(4, 1);
        break;
     case "3":
        unitRate = rating.Substring(5, 1);
        break;
      }
      //return string.Format("{0}-{1}-{2}", rating, playerCategory, unitRate );
      return unitRate;
 }