public Herbivore(Random rng, Position pos = null, IAnimalParams customParameters = null) : base(rng, pos) { if (customParameters is null) { Params = new HerbivoreParams(); } else { Params = customParameters; } var norm = new MathNet.Numerics.Distributions.Normal(Params.BirthWeight, Params.BirthSigma); Weight = norm.Sample(); }
public void OverloadAllHerbivores(HerbivoreParams parameters) { // Implement parameter cloning!!! Herbivores.ForEach(i => i.Params = parameters); }