public double GetAvgSalary(int position, LeagueAvg LA) { int play = 0; int total = 0; for (int c = 0; c < LA.PlayerAverages.Count; c++) { if (position == LA.PlayerAverages[c].Pos) { play++; total += LA.PlayerAverages[c].CurrentSalary; } } return((double)(total) / play); }
public MGMT() { Players = new List <Player>(); draftclass = new DraftClass(); Coaches = new List <Coach>(); OwnersGms = new List <Owner>(); Teams = new List <Team>(); LeaguesAverages = new LeagueAvg(); Main = new BackgroundWorker(); Loader = new BackgroundWorker(); Functions = new BackgroundWorker(); model = null; }
public MGMT() { config = new AmpConfig(); UserSettings = new UserSettingsModel(); Players = new List <Player>(); Coaches = new List <Coach>(); Owners = new List <Coach>(); Teams = new Dictionary <int, Team>(); PlayerPortDAT = new DAT(); CoachPortDAT = new DAT(); LeaguesAverages = new LeagueAvg(); Main = new BackgroundWorker(); Loader = new BackgroundWorker(); Functions = new BackgroundWorker(); }