From: Julian Cowley Date: Mon, 7 Mar 2022 09:58:09 +0000 (-1000) Subject: Return if the arrow hit something after moving randomly X-Git-Tag: 1.8~4 X-Git-Url: https://jxself.org/git/?p=wumpus.git;a=commitdiff_plain;h=ad6f6f6f4eaa9150587ec9ba56d9939542d9c54c Return if the arrow hit something after moving randomly If the arrow hit something (you or the Wumpus) after it flew around randomly because there was no tunnel, return from shoot(). This allows the game to finish correctly. --- diff --git a/wumpus.c b/wumpus.c index f4dfe50..2adc696 100644 --- a/wumpus.c +++ b/wumpus.c @@ -367,6 +367,8 @@ badrange: /* 835 GOTO 900 */ check_shot(); + if (finished != NOT) + return; /* 840 NEXT K */ nextpath: ;