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); }
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; }