ref: 3c6493e7b363400479fc163970acd930b0f5db59
parent: a409cfe16978d8e98a3754c6053cd00b09d32b26
author: Ben Harris <[email protected]>
date: Sun Aug 13 21:46:20 EDT 2023
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.
--- a/flood.c
+++ b/flood.c
@@ -845,7 +845,7 @@
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 @@
return dupstr(buf);
}
- return NULL;
+ return MOVE_NO_EFFECT;
}
static game_state *execute_move(const game_state *state, const char *move)