save (encode undo) game data