Magic-number elimination.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 19 Jun 2017 15:09:24 +0000 (11:09 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 19 Jun 2017 15:09:24 +0000 (11:09 -0400)
advent.h
main.c

index 1efde8328811c21fa09ca466fb4f7f6bf03b1bf2..e89b2ad3b00b156b0103ff5ec224a6ef7e382790 100644 (file)
--- a/advent.h
+++ b/advent.h
@@ -188,7 +188,6 @@ int action(FILE *input, enum speechpart part, long verb, token_t obj);
 #define GO_CLEAROBJ    2012
 #define GO_CHECKHINT   2600
 #define GO_CHECKFOO    2607
-#define GO_CLOSEJUMP   2610
 #define GO_DIRECTION   2620
 #define GO_LOOKUP      2630
 #define GO_WORD2       2800
diff --git a/main.c b/main.c
index 9fc8fa97ad827e24e15511e2fbcf621acbab1f8b..db804060408f4263907d2f47cb7c2deda8e19c1d 100644 (file)
--- a/main.c
+++ b/main.c
@@ -983,7 +983,8 @@ static bool do_command(FILE *cmdin)
             else
                 continue;      /* back to top of main interpreter loop */
         }
-        if (game.loc == 33 && PCT(25) && !game.closng)RSPEAK(SAYS_PLUGH);
+        if (game.loc == LOC_Y2 && PCT(25) && !game.closng)
+           RSPEAK(SAYS_PLUGH);
 
         listobjects();