From: Eric S. Raymond Date: Fri, 16 Jun 2017 19:58:51 +0000 (-0400) Subject: Code simplification. X-Git-Tag: 1.1~284 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=1596e6d81e1d77acca9edf65bf81d35964994442;p=open-adventure.git Code simplification. --- 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++) {