Base UNDEEP on the previiously unreferenced DEEP condition bit.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 18 Apr 2022 14:01:14 +0000 (10:01 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 18 Apr 2022 14:01:14 +0000 (10:01 -0400)
Removes the only dependency on the order of locations left in the macros.

advent.h

index c740c534a4397a3ccd912aa188bf44a2d73ca2e4..a2c1eb0245465aa6439f92e65755a74a4c375af8 100644 (file)
--- a/advent.h
+++ b/advent.h
@@ -81,7 +81,7 @@
 #define FOREST(LOC)  CNDBIT(LOC, COND_FOREST)
 #define OUTSID(LOC)  (CNDBIT(LOC, COND_ABOVE) || FOREST(LOC))
 #define INSIDE(LOC)  (!OUTSID(LOC) || LOC == LOC_BUILDING)
-#define INDEEP(LOC)  ((LOC) >= LOC_MISTHALL && !OUTSID(LOC))
+#define INDEEP(LOC)  CNDBIT((LOC),COND_DEEP)
 #define BUG(x)       bug(x, #x)
 
 enum bugtype {