public void HardMutation() { RedColour = RandomMutation.RandomColour(Byte.MinValue, Byte.MaxValue); GreenColour = RandomMutation.RandomColour(Byte.MinValue, Byte.MaxValue); BlueColour = RandomMutation.RandomColour(Byte.MinValue, Byte.MaxValue); AlphaColour = RandomMutation.RandomColour(Byte.MinValue, Byte.MaxValue); }
public void MediumMutation() { var colourMutation = RandomMutation.RandomIntervalIntegerInclusive(0, 4); switch (colourMutation) { case 0: RedColour = RandomMutation.RandomColour(Byte.MinValue, Byte.MaxValue); break; case 1: GreenColour = RandomMutation.RandomColour(Byte.MinValue, Byte.MaxValue); break; case 2: BlueColour = RandomMutation.RandomColour(Byte.MinValue, Byte.MaxValue); break; case 3: AlphaColour = RandomMutation.RandomColour(Byte.MinValue, Byte.MaxValue); break; } }
public void SoftMutation() { var colourMutation = RandomMutation.RandomIntervalIntegerInclusive(0, 4); switch (colourMutation) { case 0: RedColour = RandomMutation.RandomColour((byte)(RedColour - AlgorithmInformation.SmallDeltaValue()), (byte)(RedColour + AlgorithmInformation.SmallDeltaValue())); break; case 1: GreenColour = RandomMutation.RandomColour((byte)(GreenColour - AlgorithmInformation.SmallDeltaValue()), (byte)(GreenColour + AlgorithmInformation.SmallDeltaValue())); break; case 2: BlueColour = RandomMutation.RandomColour((byte)(BlueColour - AlgorithmInformation.SmallDeltaValue()), (byte)(BlueColour + AlgorithmInformation.SmallDeltaValue())); break; case 3: AlphaColour = RandomMutation.RandomColour((byte)(BlueColour - AlgorithmInformation.SmallDeltaValue()), (byte)(BlueColour + AlgorithmInformation.SmallDeltaValue())); break; } }