Allow for trailing '\0' in game_text_format() in various games.
[sgt/puzzles] / puzzles.h
index d5c8924..a9323f5 100644 (file)
--- a/puzzles.h
+++ b/puzzles.h
@@ -52,6 +52,7 @@ typedef struct midend_data midend_data;
 typedef struct random_state random_state;
 typedef struct game_params game_params;
 typedef struct game_state game_state;
+typedef struct game_aux_info game_aux_info;
 typedef struct game_ui game_ui;
 typedef struct game_drawstate game_drawstate;
 typedef struct game game;
@@ -141,6 +142,7 @@ config_item *midend_get_config(midend_data *me, int which, char **wintitle);
 char *midend_set_config(midend_data *me, int which, config_item *cfg);
 char *midend_game_id(midend_data *me, char *id, int def_seed);
 char *midend_text_format(midend_data *me);
+char *midend_solve(midend_data *me);
 
 /*
  * malloc.c
@@ -189,11 +191,15 @@ struct game {
     config_item *(*configure)(game_params *params);
     game_params *(*custom_params)(config_item *cfg);
     char *(*validate_params)(game_params *params);
-    char *(*new_seed)(game_params *params, random_state *rs);
+    char *(*new_seed)(game_params *params, random_state *rs,
+                     game_aux_info **aux);
+    void (*free_aux_info)(game_aux_info *aux);
     char *(*validate_seed)(game_params *params, char *seed);
     game_state *(*new_game)(game_params *params, char *seed);
     game_state *(*dup_game)(game_state *state);
     void (*free_game)(game_state *state);
+    int can_solve;
+    game_state *(*solve)(game_state *state, game_aux_info *aux, char **error);
     int can_format_as_text;
     char *(*text_format)(game_state *state);
     game_ui *(*new_ui)(game_state *state);