aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2023-09-17 23:22:32 +0100
committerBen Harris <bjh21@bjh21.me.uk>2023-09-17 23:22:32 +0100
commit2d9e414ee316b37143954150016e8f4f18358497 (patch)
treefaeae7ac0728894f3b17660fb29213a6875f44a9
parent67496e74f68db900d8117be6de3c75285c29c489 (diff)
downloadpuzzles-2d9e414ee316b37143954150016e8f4f18358497.zip
puzzles-2d9e414ee316b37143954150016e8f4f18358497.tar.gz
puzzles-2d9e414ee316b37143954150016e8f4f18358497.tar.bz2
puzzles-2d9e414ee316b37143954150016e8f4f18358497.tar.xz
Distinguish MOVE_UNUSED from MOVE_NO_EFFECT in Inertia
-rw-r--r--inertia.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/inertia.c b/inertia.c
index 7a97562..d120411 100644
--- a/inertia.c
+++ b/inertia.c
@@ -1635,20 +1635,20 @@ static char *interpret_move(const game_state *state, game_ui *ui,
dir = state->soln->list[state->solnpos];
if (dir < 0)
- return NULL;
+ return MOVE_UNUSED;
/*
* Reject the move if we can't make it at all due to a wall
* being in the way.
*/
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!
*/
if (state->dead)
- return NULL;
+ return MOVE_NO_EFFECT;
/*
* Otherwise, we can make the move. All we need to specify is