public PBETeamShell(PBESettings settings, int numPkmnToGenerate, bool setToMaxLevel)
 {
     if (settings == null)
     {
         throw new ArgumentNullException(nameof(settings));
     }
     if (numPkmnToGenerate < 1 || numPkmnToGenerate > settings.MaxPartySize)
     {
         throw new ArgumentOutOfRangeException(nameof(numPkmnToGenerate));
     }
     Settings = settings;
     Settings.PropertyChanged += OnSettingsChanged;
     _list = new List <PBEPokemonShell>(Settings.MaxPartySize);
     for (int i = 0; i < numPkmnToGenerate; i++)
     {
         Insert(PBEUtils.RandomSpecies(), setToMaxLevel ? Settings.MaxLevel : PBEUtils.RandomLevel(Settings), false, i);
     }
 }
 private void InsertRandom(bool fireEvent, int index)
 {
     Insert(PBEUtils.RandomSpecies(), PBEUtils.RandomLevel(Settings), fireEvent, index);
 }