Code simplification.

This commit is contained in:
Eric S. Raymond 2017-06-18 14:02:24 -04:00
parent ba5c7dacb5
commit 409ffe4a86

5
main.c
View file

@ -645,10 +645,10 @@ static bool playermove(FILE *cmdin, token_t verb, int motion)
* actual motion, but can be spotted by "go back". */ * actual motion, but can be spotted by "go back". */
/* FIXME: Arithmetic on location numbers */ /* FIXME: Arithmetic on location numbers */
game.newloc = 99 + 100 - game.loc; game.newloc = 99 + 100 - game.loc;
if (game.holdng == 0 || (game.holdng == 1 && TOTING(EMRALD))) if (game.holdng > 1 || (game.holdng == 1 && !TOTING(EMRALD))) {
return true;
game.newloc = game.loc; game.newloc = game.loc;
RSPEAK(MUST_DROP); RSPEAK(MUST_DROP);
}
return true; return true;
case 2: case 2:
/* Travel 302. Plover transport. Drop the emerald (only use /* Travel 302. Plover transport. Drop the emerald (only use
@ -693,7 +693,6 @@ static bool playermove(FILE *cmdin, token_t verb, int motion)
game.prop[BEAR] = 3; game.prop[BEAR] = 3;
game.oldlc2 = game.newloc; game.oldlc2 = game.newloc;
croak(cmdin); croak(cmdin);
return false;
} }
} }
BUG(20); BUG(20);