Open hajo4 opened 1 month ago
Please be more careful with the issue names - having the duplicate issue names is confusing for me.
Before doing something like this, I think a feature would be needed to have the demo "Replay" the current game.
feature .. to .. "Replay" the current game
Could be done as follows:
To prepare the savegame set a bookmark before doing the first move play the game until you win set another bookmark at the end save the game
To replay load the game goto first bookmark ** repeat 'redo-last-move' until end of game
It looks like restart-current-game forgets the history needed to go forward again. Going back with undo is a bit cumbersome - maybe automatically set a bookmark#0 at the begin ?
Here a small demo of such a bookmarked savegame: Hanoi Puzzle 5-85644395461021679616_ok-demo.zip
I'm more thinking about a single "Replay" button that runs the demo with the exact moves you've played to that point. And using bookmarks might not work well if bookmarks are already being used. More likely the game itself with its move history has to be passed in the demo method itself, and logic needs to be written for that.
Yes, restart current game starts a new game of the same deal, so the move history is lost. I considered adding an Undo All option, but decided against it when I realized doing so would make it very easy for a player to cheat their statistics.
Another savegame ready for playback: Pegged Cross 1-93457135428827561984_ok-demo.zip
Add a feature 'Demo-from-savegames'
This would load files like *-ok.pso from a folder of savegames, rewind and play them in demo-mode.