-static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds,
- int x, int y, int button)
+static int clue_index(const game_state *state, int x, int y)
+{
+ int w = state->par.w;
+
+ if (x == -1 || x == w)
+ return w * (x == -1 ? 2 : 3) + y;
+ else if (y == -1 || y == w)
+ return (y == -1 ? 0 : w) + x;
+
+ return -1;
+}
+
+static int is_clue(const game_state *state, int x, int y)
+{
+ int w = state->par.w;
+
+ if (((x == -1 || x == w) && y >= 0 && y < w) ||
+ ((y == -1 || y == w) && x >= 0 && x < w))
+ {
+ if (state->clues->clues[clue_index(state, x, y)] & DF_DIGIT_MASK)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static char *interpret_move(const game_state *state, game_ui *ui,
+ const game_drawstate *ds,
+ int x, int y, int button)