Saving state: saving, restoring, restarting, quitting
These four are signals, not implementations: each emits a platform
event that the engine processes after the turn through
client-registered hooks. The client owns persistence and the
confirmation UI. Verbs that parse: save/save game,
restore/load/load game/restore game, quit/q/exit game,
restart. Named saves are dormant (no slot in the grammar). Quit asks
for confirmation through a client query, but with no client hook
registered it auto-confirms and stops; restart computes whether
confirmation is warranted (unsaved progress, more than a few moves) and
leaves honoring it to the hook.
The player sees (in a client that registers no hooks, like the bare test harness, where the signal side is all there is):
> save
Save failed.
> restore
No saved games found.
"Save failed." is the engine reporting an unhandled
platform-save-requested; a real client's hook would have completed
it. Quit and restart print nothing of their own here for the same
reason.
| Refusals | Platform event | |
|---|---|---|
| save | save_not_allowed · save_in_progress · invalid_save_name | platform-save-requested |
| restore | restore_not_allowed · no_saves | platform-restore-requested |
| restart | — | platform-restart-requested |
| quit | — | platform-quit-requested |