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

Add action for undo of previous X moves #2

Open
kinabalu opened this issue May 4, 2020 · 3 comments
Open

Add action for undo of previous X moves #2

kinabalu opened this issue May 4, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@kinabalu
Copy link
Member

kinabalu commented May 4, 2020

No description provided.

@pastudan
Copy link

pastudan commented May 5, 2020

This would be cool if it automatically rolled back your previous move(s) when they are the opposite direction. For example ➡️⬇️➡️ and then ⬅️⬆⬅ would completely undo your move history and net you 0 moves

@pastudan
Copy link

pastudan commented May 5, 2020

This is a start, but I found one issue with it that I'm not sure how to fix:
https://github.com/mysticcoders/mysticrobots/compare/undo-history?expand=1

For example, when you down from here, then right, then left, it removes the right move from the history and doesn't record the left. What should really happen is that the right move should be removed and the left should be recorded.
image

@kinabalu
Copy link
Member Author

kinabalu commented May 5, 2020

I'd like to work toward getting some tests added sooner rather than later, jest, and @testing-library are my preferences.

if we can pull out the move functionality and write some tests covering the cases, we'd be better positioned to make changes faster. thoughts? we can open another ticket to track this project and tackle it

@kinabalu kinabalu added the enhancement New feature or request label May 14, 2020
@dermidgen dermidgen added this to To do in Mystic Robots May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Mystic Robots
  
To do
Development

No branches or pull requests

2 participants