Example #1
0
 public EventReport( string teamCode, string statCode, DataLibrarian tflWS)
 {
     Team = new NflTeam( teamCode );
     Team.LoadGames( teamCode, Utility.LastSeason() );
     this.tflWS = tflWS;
     StatCode = statCode;
 }
Example #2
0
 //[Inject]
 public MetricsBase( IBreakdown breakdowns )
 {
     _tflWs = Utility.TflWs;
     Season = SeasonBoss.CurrentSeason();
     TeamList = new ArrayList();
     Breakdowns = breakdowns;
 }
        public NflPerformance( int seasonIn, int weekIn, string teamIn, NFLPlayer myPlayer )
        {
            // constructor
             TeamCode = teamIn;
             Season = seasonIn;
             Week = weekIn;
             _thePlayer = myPlayer;
             _tflWs = Utility.TflWs;

             PerfStats = new PlayerStats();

              	if (teamIn == "??") return;

              	// What was the result
              	var ds = _tflWs.ResultFor( TeamCode, seasonIn, weekIn );
              	if ( ds.Tables[ 0 ].Rows.Count > 0 )
              	{
              		var dr = ds.Tables[ 0 ].Rows[ 0 ];
              		var gameCode = string.Format( "{0}:{1}-{2}", seasonIn, dr[ "WEEK" ], dr[ "GAMENO" ] );

              		Game = Masters.Gm.GetGame( gameCode ) ?? new NFLGame( dr );
              		LoadScores();
              		LoadStats();
              	}
              	else
              		TeamCode = "bye";
        }
Example #4
0
 public MetricsBase(IBreakdown breakdowns, string season )
 {
     _tflWs = Utility.TflWs;
     Season = season;
     TeamList = new ArrayList();
     Breakdowns = breakdowns;
 }
Example #5
0
 public MetricsBase()
 {
     _tflWs = Utility.TflWs;
     Season = Utility.CurrentSeason();
     TeamList = new ArrayList();
     DoBreakdowns = false;
 }
 public UndefeatedHomeDogScheme( DataLibrarian tflWSIn )
 {
     //
      //  An Undefeated home dog is bound to lose
      //
      tflWS = tflWSIn;
      Name = "Undefeated Home Dog";
 }
Example #7
0
 public HomeDogScheme( DataLibrarian tflWSIn )
 {
     //
      //  Root for the home team when they are under dogs
      //
      tflWS = tflWSIn;
      Name = "Home Dog";
 }
 public GridStatsLeague( string nameIn, string compCode, string season, int weekNo )
 {
     Name = nameIn;
     CompCode = compCode;
     Season = Utility.CurrentSeason();
     WeekNo = weekNo;
     _tflWs = Utility.TflWs;
 }
Example #9
0
 public DataLoader()
 {
     OldLibrarian = new DataLibrarian(
         Utility.NflConnectionString(),
         Utility.TflConnectionString(),
         Utility.CtlConnectionString()
         );
 }
 public NibbleLockScheme( DataLibrarian tflWsIn )
 {
     Pushes = 0;
     Losses = 0;
     //  we have a bet if teams have played in the last year and have a revenge motive
     TflWs = tflWsIn;
     Name = "Nibble LOCK";
     _pred = new NibblePredictor();
 }
 public BadNumberScheme( DataLibrarian tflWsIn )
 {
     //
      //  Bad numbers are numbers that show a statistical trend of 60% or more
      //
      //   eg Home favourites by 9.5 point fail to cover > 60% of the time
      //
      _tflWs = tflWsIn;
      Name = "Bad Number";
 }
Example #12
0
 public SandwichScheme( DataLibrarian tflWSIn )
 {
     //
      //  Non Divisional Games sandwiched between
      //  4 Divisional games has the contestant
      //  in a lull
      //
      tflWS = tflWSIn;
      Name = "Sandwich";
 }
Example #13
0
 public NFLWeek(int seasonIn, int weekIn)
 {
     TflWs = Utility.TflWs;
     Season = seasonIn.ToString();
     _sched = LoadSchedule(seasonIn, weekIn);
     #if DEBUG
     Utility.Announce(string.Format("NFLWeek:Constructor Week {0}:{2} has {1} games", weekIn,
                                                           _sched.Tables[0].Rows.Count, Season));
     #endif
     Week = weekIn.ToString();
 }
Example #14
0
        private ArrayList _teamList; //  A collection of Teams

        #endregion Fields

        #region Constructors

        public EspnLeague( string nameIn, string compCode, string season, int weekNo )
        {
            RosterLib.Utility.Announce( string.Format( "EspnReport {0}...", nameIn ) );

            Name = nameIn;
            CompCode = compCode;
            Season = season;
            WeekNo = weekNo;

            _tflWs = Utility.TflWs;
        }
Example #15
0
 public MatchupReport( NFLGame gameIn )
 {
     Utility.Announce( "Match Report for :" + gameIn.AwayTeamName + " @ " + gameIn.HomeTeamName );
     if ( gameIn.HomeNflTeam == null )
         Utility.Announce( "Teams have not been instantiated" );
     else
     {
         TflWs = Utility.TflWs;
         if ( _showTeamCards )
         {
             gameIn.AwayNflTeam.LoadTeamCard(); //  lazy load
             gameIn.AwayNflTeam.SetDefence(); //  lazy load
             gameIn.HomeNflTeam.LoadTeamCard(); //  lazy load
             gameIn.HomeNflTeam.SetDefence(); //  lazy load
         }
         _game = gameIn;
     }
 }
Example #16
0
 private void LoadPlayersForTeam(string teamCode, DataLibrarian tflWs)
 {
     GameCode = tflWs.GetGameCode(Season, Week, teamCode);
      var s = tflWs.PlayerStats(Constants.K_STATCODE_SACK, Season, Week, GameCode, teamCode);
      var hashCode = string.Format("{0}{1}", teamCode, Constants.K_STATCODE_SACK);
      var count = tflWs.TeamStats(Constants.K_STATCODE_SACK, Season, Week, GameCode, teamCode);
      if (PlayersHt == null) PlayersHt = new Hashtable();
      PlayersHt.Add(hashCode, s);
      if (StatsHt == null) StatsHt = new Hashtable();
      StatsHt.Add(hashCode, count);
 }
Example #17
0
 /// <summary>
 ///  Loads the stats for a game into a hash table.
 /// </summary>
 public void LoadStats(DataLibrarian tflWs)
 {
     LoadPlayersForTeam(HomeTeam, tflWs);
      LoadPlayersForTeam(AwayTeam, tflWs);
 }
Example #18
0
 public RevengeScheme( DataLibrarian tflWSIn )
 {
     //  we have a bet if teams have played in the last year and have a revenge motive
      tflWS = tflWSIn;
      Name = "Revenge";
 }
 public SuperbowlLetdownScheme( DataLibrarian tflWSIn )
 {
     //  we have a bet if either of the teams are the superbowl winner and the week is one or 2
      tflWS = tflWSIn;
      Name = "SuperbowlLetdown";
 }