public void Undo() { if (UndoObjects.Count == 0) { return; } while (UndoObjects.Count != 0) { UndoBase lUndoObject = UndoObjects.Pop(); if (lUndoObject == null) { return; } // Console.WriteLine("Undo> " + lUndoObject.ToString()); lUndoObject.Undo(Board); } }
public void Add(UndoBase pUndoObject) { UndoObjects.Push(pUndoObject); }