Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo command #31

Closed
rachx opened this issue Oct 8, 2016 · 1 comment
Closed

Undo command #31

rachx opened this issue Oct 8, 2016 · 1 comment

Comments

@rachx
Copy link

rachx commented Oct 8, 2016

so that I can easily correct any accidental mistakes in the last command

@burnflare
Copy link

My thought of implementing this was: We update abstract class Command to add an abstract method called reverseExecute(). All Command classes would have to implement this method which basically does the exact opposite of what the execute() command originally did. Then we can just maintain a stack of Commands and as the user calls 'undo', get the last command from the stack and call reverseExecute() on it.

@rachx rachx assigned rachx and unassigned rachx Oct 10, 2016
@burnflare burnflare changed the title As a user, I can undo my last action Undo command Oct 18, 2016
@rachx rachx mentioned this issue Oct 18, 2016
@rachx rachx closed this as completed Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants