[gambit-list] Advice on structure serialisation
Alex Queiroz
asandroq at gmail.com
Tue Dec 1 13:14:46 EST 2009
Hallo James,
On Tue, Dec 1, 2009 at 6:08 PM, James Long <longster at gmail.com> wrote:
> I've been thinking of a similar solution for game states. It would
> generally be clean and safe. The only problem I've been studying is
> upgrading previous game states, because you don't want want to throw
> out previous ones. I've been thinking of writing functions to upgrade
> one version of the game state to the next. When you load a game
> state, you find its identity according to the "id" parameter, and
> upgrade it accordingly if necessary.
>
So you would keep the old structure, with the same id, and create
for instance a new type game-state-2, with a different id, and a
converter procedure update-game-state-1->2?
Cheers,
--
-alex
@asandroq
http://www.ventonegro.org/
More information about the Gambit-list
mailing list