mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 23:51:29 -07:00
Distinguish MOVE_UNUSED from MOVE_NO_EFFECT in Inertia
This commit is contained in:
@ -1635,20 +1635,20 @@ static char *interpret_move(const game_state *state, game_ui *ui,
|
|||||||
dir = state->soln->list[state->solnpos];
|
dir = state->soln->list[state->solnpos];
|
||||||
|
|
||||||
if (dir < 0)
|
if (dir < 0)
|
||||||
return NULL;
|
return MOVE_UNUSED;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reject the move if we can't make it at all due to a wall
|
* Reject the move if we can't make it at all due to a wall
|
||||||
* being in the way.
|
* being in the way.
|
||||||
*/
|
*/
|
||||||
if (AT(w, h, state->grid, state->px+DX(dir), state->py+DY(dir)) == WALL)
|
if (AT(w, h, state->grid, state->px+DX(dir), state->py+DY(dir)) == WALL)
|
||||||
return NULL;
|
return MOVE_NO_EFFECT;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reject the move if we're dead!
|
* Reject the move if we're dead!
|
||||||
*/
|
*/
|
||||||
if (state->dead)
|
if (state->dead)
|
||||||
return NULL;
|
return MOVE_NO_EFFECT;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Otherwise, we can make the move. All we need to specify is
|
* Otherwise, we can make the move. All we need to specify is
|
||||||
|
Reference in New Issue
Block a user