public object Clone()
 {
     return(new CloneCharacter()
     {
         programs = (LinkedStack <string>)programs.Clone(),
         rollbacks = (LinkedStack <string>)rollbacks.Clone()
     });
 }
 // Возвращает уже клонированого клона
 public Cloner Clone(int newCloneNumber)
 {
     return(new Cloner(newCloneNumber)
     {
         learnedProg = (LinkedStack <string>)learnedProg.Clone(),
         cancelProg = (LinkedStack <string>)cancelProg.Clone()
     });
 }
Example #3
0
 public Clone(Clone clone)
 {
     LearnedProgramms.Clone(clone.LearnedProgramms);
     RolledBackProgramms.Clone(clone.RolledBackProgramms);
 }
 public Clone CloneCmd(int newId) => new Clone(newId)
 {
     isRollbacked = isRollbacked,
     learned      = LinkedStack <string> .Clone(learned),
     history      = LinkedStack <string> .Clone(history)
 };