コード例 #1
0
 public void Calculate( string season, string week )
 {
     var theWeek = new NFLWeek( season, week );
     theWeek.LoadGameList();
     foreach ( var nflStat in theWeek.GameList().Cast<NFLGame>()
         .Select( game => game.GenerateGridStatsOutput() ).SelectMany( statList => statList ) )
         PutStat( nflStat );
 }
コード例 #2
0
 public void Calculate( string season, string week )
 {
     var theWeek = new NFLWeek( season, week );
     theWeek.LoadGameList();
      Announce( string.Format("{0} Games loaded for {1}:{2}",
     theWeek._gameList.Count, season, week ) );
     foreach ( var nflStat in theWeek.GameList().Cast<NFLGame>()
         .Select( game => game.GenerateYahooOutput() ).SelectMany( statList => statList ) )
         PutStat( nflStat );
 }
コード例 #3
0
ファイル: StatMaster.cs プロジェクト: Quarterback16/GerardGui
        public void Calculate( string season, string week )
        {
            var theWeek = new NFLWeek( season, week );
             if (!theWeek.HasPassed()) return;

            theWeek.LoadGameList();
            foreach ( var nflStat in theWeek.GameList().Cast<NFLGame>()
                .Select( game => game.GenerateStats() ).SelectMany( statList => statList ) )
                PutStat( nflStat );
        }
コード例 #4
0
        public void Calculate(string season, string week)
        {
            var theWeek = new NFLWeek(season, week);

            theWeek.LoadGameList();
            foreach (var nflStat in theWeek.GameList().Cast <NFLGame>()
                     .Select(game => game.GenerateYahooOutput()).SelectMany(statList => statList))
            {
                PutStat(nflStat);
            }
        }
コード例 #5
0
        public void Calculate(string season, string week)
        {
            var theWeek = new NFLWeek(season, week);

            if (!theWeek.HasPassed())
            {
                return;
            }

            theWeek.LoadGameList();
            foreach (var nflStat in theWeek.GameList().Cast <NFLGame>()
                     .Select(game => game.GenerateStats()).SelectMany(statList => statList))
            {
                PutStat(nflStat);
            }
        }
コード例 #6
0
        private string GenerateBody()
        {
            var bodyOut = new StringBuilder();

            bodyOut.AppendLine(string.Format("Recording actual metrics for Week {0}:{1}", Season, Week));
            bodyOut.AppendLine();

            // Foreach game in the week
            var theWeek = new NFLWeek(Season, Week);

            theWeek.LoadGameList();
            foreach (NFLGame game in theWeek.GameList())
            {
                var homeList = game.LoadLineupPlayers(game.HomeTeam);
                TallyMetrics(bodyOut, game, homeList);

                var awayList = game.LoadLineupPlayers(game.AwayTeam);
                TallyMetrics(bodyOut, game, awayList);
            }

            return(bodyOut.ToString());
        }
コード例 #7
0
        private string GenerateBody()
        {
            var bodyOut = new StringBuilder();
             bodyOut.AppendLine(string.Format("Recording actual metrics for Week {0}:{1}", Season, Week ) );
             bodyOut.AppendLine();

             // Foreach game in the week
             var theWeek = new NFLWeek(Season, Week);
             theWeek.LoadGameList();
             foreach (NFLGame game in theWeek.GameList())
             {
            var homeList = game.LoadLineupPlayers(game.HomeTeam);
            TallyMetrics( bodyOut, game, homeList);

            var awayList = game.LoadLineupPlayers(game.AwayTeam);
            TallyMetrics(bodyOut, game, awayList);
             }

             return bodyOut.ToString();
        }