chiark / gitweb /
Re-architecting of the game backend interface. make_move() has been
[sgt-puzzles.git] / nullgame.c
index 3bcfe4633b1347880d0141472bc3906d493b485d..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;
 }
@@ -147,8 +147,17 @@ static void game_changed_state(game_ui *ui, game_state *oldstate,
 {
 }
 
-static game_state *make_move(game_state *from, game_ui *ui, game_drawstate *ds,
-                             int x, int y, int button)
+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;
 }
@@ -157,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 */
 }
@@ -250,7 +256,8 @@ const struct game thegame = {
     new_ui,
     free_ui,
     game_changed_state,
-    make_move,
+    interpret_move,
+    execute_move,
     game_size,
     game_colours,
     game_new_drawstate,