From a6b41fdb8f8c56707f8bb5ffa2ad85eba5335c41 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 14 Apr 2023 08:13:24 -0400 Subject: [PATCH] Simplify initialization code. All tests pass, 100% coverage. --- init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.c b/init.c index 0813fb7..532f271 100644 --- a/init.c +++ b/init.c @@ -89,9 +89,9 @@ int initialise(void) * not yet found, so we know when to close the cave. */ for (int treasure = 1; treasure <= NOBJECTS; treasure++) { if (objects[treasure].is_treasure) { + ++game.tally; if (objects[treasure].inventory != 0) PROP_SET_NOT_FOUND(treasure); - game.tally = game.tally - game.objects[treasure].prop; } } game.conds = setbit(COND_HBASE); -- 2.31.1