mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
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.
This commit is contained in:
4
flood.c
4
flood.c
@ -845,7 +845,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
|
|||||||
state->soln && state->solnpos < state->soln->nmoves) {
|
state->soln && state->solnpos < state->soln->nmoves) {
|
||||||
move = state->soln->moves[state->solnpos];
|
move = state->soln->moves[state->solnpos];
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return MOVE_UNUSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tx >= 0 && tx < w && ty >= 0 && ty < h &&
|
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 dupstr(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return MOVE_NO_EFFECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static game_state *execute_move(const game_state *state, const char *move)
|
static game_state *execute_move(const game_state *state, const char *move)
|
||||||
|
Reference in New Issue
Block a user