aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2023-08-14 01:46:20 +0100
committerBen Harris <bjh21@bjh21.me.uk>2023-08-14 01:46:20 +0100
commit3c6493e7b363400479fc163970acd930b0f5db59 (patch)
tree7d50eb043ac33ffe5b2c81f11ea25481d862923e
parenta409cfe16978d8e98a3754c6053cd00b09d32b26 (diff)
downloadpuzzles-3c6493e7b363400479fc163970acd930b0f5db59.zip
puzzles-3c6493e7b363400479fc163970acd930b0f5db59.tar.gz
puzzles-3c6493e7b363400479fc163970acd930b0f5db59.tar.bz2
puzzles-3c6493e7b363400479fc163970acd930b0f5db59.tar.xz
Distinguish MOVE_UNUSED from MOVE_NO_EFFECT in Flood
Clicking outside the grid hides the keyboard cursor, so it's not MOVE_UNUSED like it usually is.
-rw-r--r--flood.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/flood.c b/flood.c
index c6effeb..ea4f5a5 100644
--- a/flood.c
+++ b/flood.c
@@ -845,7 +845,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
state->soln && state->solnpos < state->soln->nmoves) {
move = state->soln->moves[state->solnpos];
} else {
- return NULL;
+ return MOVE_UNUSED;
}
if (tx >= 0 && tx < w && ty >= 0 && ty < h &&
@@ -858,7 +858,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
return dupstr(buf);
}
- return NULL;
+ return MOVE_NO_EFFECT;
}
static game_state *execute_move(const game_state *state, const char *move)