public void WhenCreatureContextCreated_EnergyShouldBeCorrect() { byte[] genes = GenerateRandomGenome(256); Incubator incubator = new Incubator(); CreatureCreationContext context = incubator.GenerateContext(genes); byte energy = genes [genes [incubator.Positions [Incubator.GenePosition.StartEnergyPosition]]]; Assert.AreEqual(energy, context.Energy); }
public void WhenCreatureContextCreated_SmallGenome_EnergyShouldBeCorrect() { int genomeLength = 8; byte[] genes = GenerateRandomGenome(genomeLength); Incubator incubator = new Incubator(); CreatureCreationContext context = incubator.GenerateContext(genes); int position = genes [incubator.Positions [Incubator.GenePosition.StartEnergyPosition]]; Assert.AreEqual(genes [position], context.Energy); }