public void ComputerTeamDraft(LeaugeTeam a_team, String a_name) { int BestPick = 0; int MostPoints = 0; int index = 0; int totalPoints; foreach (string player in PlayerPoints.Skip(1)) { index++; totalPoints = Int32.Parse(player); if (totalPoints > MostPoints && CheckIfPlayerTaken(index) == false && a_team.CanDraftPosition(PlayerPos, index) == true) { MostPoints = totalPoints; BestPick = index; } } String[] aPick = PlayerName[BestPick].Split('\\'); PlayerName[BestPick] = aPick[0]; Console.WriteLine("{0} Drafted: {1}", a_name, PlayerName[BestPick]); if (PlayerPos[BestPick].Contains('G')) { a_team.AddGuard(); } else if (PlayerPos[BestPick].Contains('F')) { a_team.AddForward(); } else if (PlayerPos[BestPick].Contains('C')) { a_team.AddCenters(); } AddTakenPlayer(BestPick); a_team.AddingPlayer(BestPick); }