aboutsummaryrefslogtreecommitdiff
path: root/nullgame.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-05-19 11:57:09 +0000
committerSimon Tatham <anakin@pobox.com>2004-05-19 11:57:09 +0000
commit350683b25371ec6a7548b2e83b2be15eb629815f (patch)
tree99e1103fd09c1e6ed73df97d33c0ae8c101564f0 /nullgame.c
parentba076fbdb26149d39e076e161ace330149e71b30 (diff)
downloadpuzzles-350683b25371ec6a7548b2e83b2be15eb629815f.zip
puzzles-350683b25371ec6a7548b2e83b2be15eb629815f.tar.gz
puzzles-350683b25371ec6a7548b2e83b2be15eb629815f.tar.bz2
puzzles-350683b25371ec6a7548b2e83b2be15eb629815f.tar.xz
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]
Diffstat (limited to 'nullgame.c')
-rw-r--r--nullgame.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/nullgame.c b/nullgame.c
index 32e6e2c..67982b9 100644
--- a/nullgame.c
+++ b/nullgame.c
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#include <ctype.h>
#include <math.h>
#include "puzzles.h"
@@ -61,6 +62,20 @@ game_params *dup_params(game_params *params)
return ret;
}
+game_params *decode_params(char const *string)
+{
+ game_params *ret = snew(game_params);
+
+ ret->FIXME = 0;
+
+ return ret;
+}
+
+char *encode_params(game_params *params)
+{
+ return dupstr("FIXME");
+}
+
config_item *game_configure(game_params *params)
{
return NULL;