neoneye / ARC-Interactive

Enjoy puzzle-solving directly in your browser.
https://neoneye.github.io/arc/
MIT License
18 stars 2 forks source link

Editor: Undo a batch of setpixel actions #34

Closed neoneye closed 7 months ago

neoneye commented 8 months ago

Problem

Undoing set pixel actions happens one pixel at a time, so it takes a long time to undo the latest drawing operation.

Solution

The entire history of the set pixels actions must be preserved, since it's needed for replaying the solution.

Idea: assign a unique id to the actions that belong to the same batch.

neoneye commented 7 months ago

I'm keeping the undo as it is. Having solved several ARC tasks with the editor, I don't think batch undo will add much value.