Command Pattern Implements Undo Just add Undo in your invoker and change command to array of commands