in playermove() is particularly horrible, jumping backwards into the
middle of a loop.
-* In playermove(), why doesn't replacing the global motion number K
- with a passed-in argument work? There's some unobvious information
- leak here.
-
* The way return values from handlers such as 2012 trigger side effects
based on global state is nasty.
* him, so we need game.oldlc2, which is the last place he was
* safe.) */
-static bool playermove(FILE *cmdin, token_t verb)
+static bool playermove(FILE *cmdin, token_t verb, int motion)
{
- int LL, K2, KK=KEY[game.loc], motion = K;
+ int LL, K2, KK=KEY[game.loc];
game.newloc=game.loc;
if (KK == 0)
BUG(26);
BUG(99);
/* Figure out the new location */
-L8: if (playermove(cmdin, VERB))
+L8: if (playermove(cmdin, VERB, K))
return true;
else
goto L2000;