Make it easier to change where wumpus is installed.
[wumpus.git] / superhack.c
index 3f33547257617c6878cc0702c93976cfe521bbba..f4f616e79c980464072f99942efb8e928619977b 100644 (file)
@@ -3,9 +3,8 @@
  *
  * Author: Eric S. Raymond <esr@snark.thyrsus.com>
  *
- * My update of a classic adventure game.  The C is crude because it's
- * a hack on a line-by-line translation of a BASIC `Hunt The Wumpus'.
- * This code is no relation to the elaborate dungeon game called `Hack'.
+ * My update of a classic adventure game.  This code is no relation to
+ * the elaborate dungeon game called `Hack'.
  *
  * Any resemblance to persons living or dead is strictly coincidental.  And
  * if you believe *that*...
@@ -232,7 +231,7 @@ void throw()
     }
 
     for (k = 0; k < j9; k++)
-       if (path[k] == path[k - 2])
+       if (k >= 2 && path[k] == path[k - 2])
        {
            (void) puts("Pies can't fly that crookedly --- try again.");
            return;
@@ -333,7 +332,7 @@ goodmove:
        PM("Yow! You interrupted the superhack.");
        move_superhack();
     }
-    else if (scratchloc == loc[STARLET1] || scratchloc == loc[STARLET1])
+    else if (scratchloc == loc[STARLET1] || scratchloc == loc[STARLET2])
     {
        PM("You begin to babble at an unimpressed starlet.  You lose!");
        finished = LOSE;