From ad6f6f6f4eaa9150587ec9ba56d9939542d9c54c Mon Sep 17 00:00:00 2001 From: Julian Cowley Date: Sun, 6 Mar 2022 23:58:09 -1000 Subject: [PATCH] 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. --- wumpus.c | 2 ++ 1 file changed, 2 insertions(+) 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: ; -- 2.31.1