restore

abstract fun restore(snapshot: S): S

Returns the game state represented by snapshot.

Called at the start of rollback to reinstate the last authoritative checkpoint before replaying pending inputs on top of it.

For immutable state types this is typically the identity function { it }. For mutable containers, return a fresh copy so subsequent mutations don't corrupt the stored snapshot.