public Player[] GetPlayers(DepthChart chart) { Player[] retVal = new Player[11]; int mlbCount = 0, lolbCount = 0, rolbCount = 0, dtCount = 0, reCount = 0, leCount = 0, cbCount = 0, ssCount = 0, fsCount = 0; for (int i = 0; i < players.Length; i++) { Player temp; switch (players[i].GetPosition()) { //MLB = 0, LOLB = 1, ROLB = 2, DT = 3, RE = 4, LE = 5, CB = 6, SS = 7, FS = 8 case (int)Constants.MLB: temp = chart.middleLinebackers[mlbCount++]; break; case (int)Constants.LOLB: temp = chart.leftOutsideLinebackers[lolbCount++]; break; case (int)Constants.ROLB: temp = chart.rightOutsideLinebackers[rolbCount++]; break; case (int)Constants.DT: temp = chart.defensiveTackles[dtCount++]; break; case (int)Constants.RE: temp = chart.rightEnds[reCount++]; break; case (int)Constants.LE: temp = chart.leftEnds[leCount++]; break; case (int)Constants.CB: temp = chart.cornerBacks[cbCount++]; break; case (int)Constants.SS: temp = chart.strongSafeties[ssCount++]; break; default: temp = chart.freeSafeties[fsCount++]; break; } retVal[i] = temp; } // TODO: Make it so that the coach can sub in/out players // Also check to make sure no duplicates exist return(retVal); }
public Player[] GetPlayers(DepthChart chart) { Player[] retVal = new Player[11]; // TODO: Make it so that the coach can sub in/out players // Also check to make sure no duplicates exist retVal[0] = chart.quarterbacks[0]; retVal[1] = chart.leftTackles[0]; retVal[2] = chart.leftGuards[0]; retVal[3] = chart.centers[0]; retVal[4] = chart.rightGuards[0]; retVal[5] = chart.rightTackles[0]; int wrCount = 0, teCount = 0, hbCount = 0, fbCount = 0; for (int i = 0; i < players.Length; i++) { Player temp; switch (players[i].GetActualPosition()) { case (int)Constants.WR: temp = chart.wideRecievers[wrCount++]; break; case (int)Constants.HB: temp = chart.halfbacks[hbCount++]; break; case (int)Constants.FB: temp = chart.fullbacks[fbCount++]; break; default: temp = chart.tightEnds[teCount++]; break; } retVal[6 + i] = temp; } return(retVal); }
public Team(string name) { teamName = name; record = new Record(); allTimeRecord = new Record(); playoffRecord = new Record(); seasonRecordVsTeam = new List <Record>(); allTimeRecordvsTeam = new List <Record>(); for (int i = 0; i < 32; i++) { seasonRecordVsTeam.Add(new Record()); allTimeRecordvsTeam.Add(new Record()); } depthChart = new DepthChart(); players = new List <Player>(); }