// Возвращает скопированый стэк для нового клона public object Clone() { var newCloneStack = new LinkedStack <T>(); newCloneStack.head = head; return(newCloneStack); }
public Clone(int id) { learned = new LinkedStack <string>(); history = new LinkedStack <string>(); isRollbacked = false; Id = id; }
public void Add(string str) { if (progsUndo.Head != null) { progsUndo = new LinkedStack <string>(); } progs.Push(str); }
public CloneCharacter() { programs = new LinkedStack <string>(); rollbacks = new LinkedStack <string>(); }
public Clone() { LearnedProgramms.CreateLinkedStack("basic"); RolledBackProgramms = new LinkedStack <string>(); }
public void Clone(LinkedStack <Type> clone) { head = clone.head; tail = clone.tail; }
public void Learn(int program) { programs.Push(program); rollbacks = new LinkedStack <int>(); }
public Clone CloneCmd(int newId) => new Clone(newId) { isRollbacked = isRollbacked, learned = LinkedStack <string> .Clone(learned), history = LinkedStack <string> .Clone(history) };
public Clone(LinkedStack <string> progs, LinkedStack <string> progsUndo) { this.progs = progs; this.progsUndo = progsUndo; }