chiark / gitweb /
Re-architecting of the game backend interface. make_move() has been
[sgt-puzzles.git] / nullgame.c
index 49173b6d0c2fadd5025e33368d7e1421ecdfaea8..bc3f64a06b7174127c26634b76e7b94df2601265 100644 (file)
@@ -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, game_drawstate *ds,
-                             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, game_drawstate *ds,
  * 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,