示例#1
0
 public PlantGenetics(Random randomGenerator, TurtlePen turtlePen, SunInformation sunInformation, float mutationChance)
 {
     _turtlePen      = turtlePen;
     _mutationChance = mutationChance;
     _crossOver      = new PlantCrossOver(randomGenerator);
     _mutation       = new PlantMutation(randomGenerator, mutationChance);
     _selection      = new PlantSelection(randomGenerator);
     _fitness        = new PlantFitness(new LeafFitness(sunInformation));
     _sunInformation = sunInformation;
 }
示例#2
0
 public LeafFitness(SunInformation sunInformation)
 {
     _sunInformation = sunInformation;
 }