Undo and Redo with Commands
An undo button that remembers only the last change can't take back two mistakes, and can't redo anything; when each command knows how to reverse itself, a stack of done commands and a stack of undone ones give the dispatcher as many undos and redos as she needs.
Updated

- Category
- Data Structures
- Level
- Journeyman
- Tags
- "Last In", "First Out", Command Pattern, OOP, stack