From 1596e6d81e1d77acca9edf65bf81d35964994442 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 16 Jun 2017 15:58:51 -0400 Subject: [PATCH] Code simplification. --- main.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/main.c b/main.c index 2d9a207..d7ecd77 100644 --- a/main.c +++ b/main.c @@ -475,14 +475,13 @@ static void croak(FILE *cmdin) * death and exit. */ RSPEAK(DEATH_CLOSING); score(endgame); - } else { - /* FIXME: Arithmetic on message numbers */ - if (!YES(cmdin,WATCH_IT+game.numdie*2,WHICH_WAY+game.numdie*2,OK_MAN)) - score(endgame); - if (game.numdie == MAXDIE) + + } + /* FIXME: Arithmetic on message numbers */ + else if (game.numdie == MAXDIE || !YES(cmdin,WATCH_IT+game.numdie*2,WHICH_WAY+game.numdie*2,OK_MAN)) score(endgame); - game.place[WATER] = NOWHERE; - game.place[OIL] = NOWHERE; + else { + game.place[WATER] = game.place[OIL] = NOWHERE; if (TOTING(LAMP)) game.prop[LAMP]=0; for (int j=1; j<=NOBJECTS; j++) { -- 2.31.1