Introduce routines in each game module to encode a set of game

parameters as a string, and decode it again. This is used in
midend.c to prepend the game parameters to the game seed, so that
copying out of the Specific box is sufficient to completely specify
the game you were playing.
Throughout development of these games I have referred to `seed'
internally, and `game ID' externally. Now there's a measurable
difference between them! :-)

[originally from svn r4231]
This commit is contained in:
Simon Tatham
2004-05-19 11:57:09 +00:00
parent ba076fbdb2
commit 350683b253
8 changed files with 200 additions and 10 deletions

View File

@ -162,6 +162,8 @@ extern const char *const game_name;
const int game_can_configure;
game_params *default_params(void);
int game_fetch_preset(int i, char **name, game_params **params);
game_params *decode_params(char const *string);
char *encode_params(game_params *);
void free_params(game_params *params);
game_params *dup_params(game_params *params);
config_item *game_configure(game_params *params);