Example #1
0
        public IEnumerable <Winner> GetWinners()
        {
            var week    = new NFLWeek(Season, Week);
            var winners = new List <Winner>();

            foreach (NFLGame g in week.GameList())
            {
                g.CalculateSpreadResult();
                var teamCode = g.BookieTip.WinningTeam();
                var winner   = new Winner
                {
                    Team   = g.Team(teamCode),
                    Margin = Math.Abs(g.Spread),
                    Home   = g.IsHome(teamCode),
                    Game   = g
                };
                winners.Add(winner);
            }

            return(winners);
        }
Example #2
0
        private IEnumerable<Winner> GetWinners()
        {
            var week = new NFLWeek( Season, Week );
             var winners = new List<Winner>();
             foreach ( NFLGame g in week.GameList() )
             {
            g.CalculateSpreadResult();
            var teamCode = g.BookieTip.WinningTeam();
            var winner = new Winner
            {
               Team = g.Team( teamCode ),
               Margin = Math.Abs( g.Spread ),
               Home = g.IsHome( teamCode ),
               Game = g
            };
            winners.Add( winner );
             }

             return winners;
        }