public static Layer Generate(int numColors, int length, Func<int, int> generator) { var l = new Layer(); for (int i = 0; i < length; i++) { var c = generator(i) % numColors; l.Add(c); } return l; }
public Layer Iterate() { ///Generates a new Layer Layer newLayer = new Layer(); for (int i = 0; i < activeLayer.Values.Count(); i++) { newLayer.Add(TransitionRule(activeLayer.Values, i, NumberOfStates)); } activeLayer = newLayer; return activeLayer; }