Unciv icon indicating copy to clipboard operation
Unciv copied to clipboard

"Undo" feature

Open UniqueActive opened this issue 4 years ago • 4 comments

Hello,

my partner and I frequently make mistakes or want to make adjustments while playing our turn in later stages of the game. Especially while at war, turns can take quite a while as there are many units to move and decisions to make.

At this point, wanting to undo a move would require us to exit to the main menu and open the turn again, which would reset our mistake, but sadly also everything else we did up to that point, which can get quite tedious over time in long turns and error-prone situations.

Have you considered implementing an "undo" feature for this purpose? The game could keep track of which moves have been made in what order, and an undo button or an actual move history could enable you to undo errors much easier.

Thanks for your great work, we enjoy your game a lot!

UniqueActive avatar Feb 12 '21 19:02 UniqueActive

Until now I was thinking if this as 'all actions' and this considered it infeasable, but I think if we limit this to 'unit movement only' it's possible. Where in the UI do you think this could go?

yairm210 avatar May 20 '21 15:05 yairm210

Until now I was thinking if this as 'all actions' and this considered it infeasable, but I think if we limit this to 'unit movement only' it's possible. Where in the UI do you think this could go?

Maybe something like that? The first position is better for small displays.

Image_0

ghost avatar Oct 09 '21 07:10 ghost

@UniqueActive A workaround is that on each beginning of the turn, your game gets saved. So at least you can always return to the beginning of the turn.

Azzurite avatar Jul 14 '22 17:07 Azzurite

Until now I was thinking if this as 'all actions' and this considered it infeasable, but I think if we limit this to 'unit movement only' it's possible.

@yairm210 There is basically no difference between the two. If you create a general GameAction with an undo() method, but it's only implemented for movement, that is the same as if you would "just" implement undo for movement.

The difference is that with the first approach we could slowly begin to migrate all actions to GameAction implementations and eventually have the "undo for all actions" that is deemed so infeasable ;) It's not necessary to do everything at the same time.

Azzurite avatar Jul 14 '22 17:07 Azzurite

Closing this for lack of interest. It's probably doable, but I really don't see myself working on this ever, and considering it's been a year and a half neither does anyone else

yairm210 avatar Nov 20 '22 21:11 yairm210