//Creates a new generation, the fittest of the last lives on, then clones it and mutates the clones public void NaturalSelection() { Being[] newBeings = new Being[beings.Length]; newBeings[0] = beings[bestBeing]; newBeings[0].isBest = true; for (uint i = 1; i < newBeings.Length; i++) { newBeings[i] = beings[bestBeing].Baby(); newBeings[i].Mutate(); } beings = newBeings; gen++; }
public double Average(Being being) { return((being.Lust + being.Gluttony + being.Greed + being.Sloth + being.Wrath + being.Envy + being.Pride + being.Vainglory) / 8.00); }