throw new RuntimeException("Found Chromosome with invalid Alleles. See config option \"genetics.clear.invalid.chromosomes\".");
}
}
// handle old saves that have missing chromosomes
IChromosome speciesChromosome = chromosomes[EnumTreeChromosome.SPECIES.ordinal()];
if (speciesChromosome != null) {
IAlleleSpecies species = (IAlleleSpecies)speciesChromosome.getActiveAllele();
IAllele[] template = getSpeciesRoot().getTemplate(species.getUID());
for (int i = 0; i < chromosomes.length; i++) {
if ((chromosomes[i] == null) && (template[i] != null))
chromosomes[i] = new Chromosome(template[i]);
}