chiark / gitweb /
Re-architecting of the game backend interface. make_move() has been
[sgt-puzzles.git] / nullgame.c
index abb6cc51d1ebfd7acf25dc4261b7e846c3a45348..bc3f64a06b7174127c26634b76e7b94df2601265 100644 (file)
@@ -84,7 +84,7 @@ static char *validate_params(game_params *params)
 }
 
 static char *new_game_desc(game_params *params, random_state *rs,
-                          game_aux_info **aux)
+                          game_aux_info **aux, int interactive)
 {
     return dupstr("FIXME");
 }
@@ -122,8 +122,8 @@ static void free_game(game_state *state)
     sfree(state);
 }
 
-static game_state *solve_game(game_state *state, game_aux_info *aux,
-                             char **error)
+static char *solve_game(game_state *state, game_state *currstate,
+                       game_aux_info *aux, char **error)
 {
     return NULL;
 }
@@ -142,8 +142,22 @@ static void free_ui(game_ui *ui)
 {
 }
 
-static game_state *make_move(game_state *from, game_ui *ui, int x, int y,
-                            int button)
+static void game_changed_state(game_ui *ui, game_state *oldstate,
+                               game_state *newstate)
+{
+}
+
+struct game_drawstate {
+    int FIXME;
+};
+
+static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds,
+                           int x, int y, int button)
+{
+    return NULL;
+}
+
+static game_state *execute_move(game_state *state, char *move)
 {
     return NULL;
 }
@@ -152,11 +166,8 @@ static game_state *make_move(game_state *from, game_ui *ui, int x, int y,
  * Drawing routines.
  */
 
-struct game_drawstate {
-    int FIXME;
-};
-
-static void game_size(game_params *params, int *x, int *y)
+static void game_size(game_params *params, game_drawstate *ds,
+                      int *x, int *y, int expand)
 {
     *x = *y = 200;                     /* FIXME */
 }
@@ -244,7 +255,9 @@ const struct game thegame = {
     FALSE, game_text_format,
     new_ui,
     free_ui,
-    make_move,
+    game_changed_state,
+    interpret_move,
+    execute_move,
     game_size,
     game_colours,
     game_new_drawstate,
@@ -254,4 +267,5 @@ const struct game thegame = {
     game_flash_length,
     game_wants_statusbar,
     FALSE, game_timing_state,
+    0,                                /* mouse_priorities */
 };