Exemple #1
0
 /// <summary>
 /// Segment I (Weeks 1-4)
 /// Pointer Eleven: (p 70)
 ///   Sandwich Game
 ///   I look to wager against a team ina  divisional series "sandwich game".
 ///   A sandwich game is a non-divisional game that takes placewhen a team has just played 
 ///   at least two straight divisional games and has at least 2 more straight divisional
 ///   games coming up after the non divisional contest.
 /// </summary>
 public static bool TeamSandwiched( NflTeam t, NFLGame nextGame )
 {
     bool sandwichGame = false;
      if ( ! nextGame.IsDivisionalGame() )
      {
     NFLGame lastGame = t.PreviousGame( nextGame.GameDate );
     if ( lastGame.IsDivisionalGame() )
     {
        NFLGame lastLastGame = t.PreviousGame( lastGame.GameDate );
        if ( lastLastGame.IsDivisionalGame() )
        {
           //  now what about the next game?
           NFLGame nextNextGame = t.NextGame( nextGame.GameDate );
           if (nextNextGame != null)
           {
              if (nextNextGame.IsDivisionalGame())
              {
                 // finally another one
                 NFLGame nextNextNextgame = t.NextGame(nextNextGame.GameDate);
                 if (nextNextNextgame.IsDivisionalGame())
                    sandwichGame = true;
              }
           }
        }
     }
      }
      return sandwichGame;
 }
 //    Does NextWeek equate to Current Week
 public bool IsCurrent( NflTeam team, DateTime when )
 {
     var nextGame = team.NextGame(when);
     var currentWeek = Utility.CurrentNFLWeek();
     return currentWeek.Season.Equals( nextGame.Season ) && currentWeek.WeekNo.Equals( nextGame.WeekNo );
 }