public void Clear() { Quarterback.Clear(); Receivers.Clear(); Runningbacks.Clear(); OffensiveLinemen.Clear(); TightEnds.Clear(); Cornerbacks.Clear(); Linebackers.Clear(); DefensiveLinemen.Clear(); Safeties.Clear(); }
public void Clear() { Receivers.Clear(); Runningbacks.Clear(); OffensiveLinemen.Clear(); TightEnds.Clear(); Cornerbacks.Clear(); Linebackers.Clear(); DefensiveLinemen.Clear(); Safeties.Clear(); allPositions.Clear(); offensivePositions.Clear(); defensivePositions.Clear(); }
public void OptimizeCombinations(List <NFLLineup> lineups) { Console.WriteLine("Before Optimiaztion"); DisplayCombinations(); Quarterbacks.Clear(); TopRunningBacks.Clear(); TopWideReceivers.Clear(); TightEnds.Clear(); foreach (var lineup in lineups) { if (!Quarterbacks.Contains(lineup.Quarterback)) { Quarterbacks.Add(lineup.Quarterback); } if (!TightEnds.Contains(lineup.TightEnd)) { TightEnds.Add(lineup.TightEnd); } foreach (var player in lineup.WideReceivers) { if (!TopWideReceivers.Contains(player)) { TopWideReceivers.Add(player); } } foreach (var player in lineup.RunningBacks) { if (!TopRunningBacks.Contains(player)) { TopRunningBacks.Add(player); } } } Console.WriteLine("After Optimaztion"); BuildCombinations(); }