protected override void BeforeMutate() { JObject properties = InitialiserContextProvider.GetContext <byte> ().Serialise(); Min = properties.Value <byte> ("Min"); Max = properties.Value <byte> ("Max"); //Let the int based stuff do our heavy lifting, rather than repeat code IntBasedGenomeInitialiserContext intContext = new IntBasedGenomeInitialiserContext(); intContext.Min = Min; intContext.Max = Max; _mutator = new IntBasedMutator(intContext); _mutator.LoadProperties(); AllowUnchecked = properties.Value <bool> ("AllowUnchecked"); }
public IntBasedMutator(IntBasedGenomeInitialiserContext overrideContext) { _overrideContext = overrideContext; }