Turn an odd test into a macro disjunction.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 9 Apr 2023 01:17:55 +0000 (21:17 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 9 Apr 2023 01:17:55 +0000 (21:17 -0400)
Was game.objects[i].prop > STATE_NOTFOUND.

This finishes off all the statec comparisons we want to macroize.

score.c

diff --git a/score.c b/score.c
index ed9cdeda34263281610372603e9da659ff906979..c0a0277b36afd4f5d1f2e0c2d26f6665eba39c52 100644 (file)
--- a/score.c
+++ b/score.c
@@ -48,7 +48,7 @@ int score(enum termination mode)
                 k = 14;
             if (i > CHEST)
                 k = 16;
-            if (game.objects[i].prop > STATE_NOTFOUND)
+            if (!PROP_IS_STASHED(i) && !PROP_IS_NOTFOUND(i))
                 score += 2;
             if (game.objects[i].place == LOC_BUILDING && PROP_IS_FOUND(i))
                 score += k - 2;