public static double[] OpponentFreeThrowPercentageByGame(this BasketballTeam t) { double[] ofgp = new double[t.Matchups.Count]; for (int i = 0; i < t.Matchups.Count; i++) { BasketballTeam opp; Matchup oppMatch = t.GetOpposingMatchup(i, out opp); if (opp != null && oppMatch != null) { ofgp[i] = opp.FreeThrowPercentageAgainstOpponent(oppMatch); } } return(ofgp); }
public static double[] OpponentFoulsByGame(this BasketballTeam t) { double[] ofgp = new double[t.Matchups.Count]; for (int i = 0; i < t.Matchups.Count; i++) { BasketballTeam opp; Matchup oppMatch = t.GetOpposingMatchup(i, out opp); if (opp != null && oppMatch != null) { foreach (BasketballPerformance p in oppMatch.Performances) { ofgp[i] += p.PersonalFouls; } } } return(ofgp); }