/// <summary> /// Creates a duplicate of this Enigma and reset then. /// </summary> /// <returns></returns> public MarkMark CloneMarkMark(bool andReset) { List <Module> lst = new List <Module>(); foreach (Module module in Modules) { lst.Add(module.Clone(andReset)); } return(new MarkMark(Reflector.Clone(), FrontPlugBoard.Clone(), lst.ToArray())); }
/// <summary> /// Creates a duplicate of this Enigma and reset then. /// </summary> /// <returns></returns> public Enigma CloneEnigma(bool andReset) { List <RotorEnigma> lst = new List <RotorEnigma>(); foreach (RotorEnigma rotor in Rotors) { lst.Add(rotor.Clone(andReset)); } return(new Enigma(Reflector.Clone(), PlugBoard.Clone(), lst.ToArray())); }