Gotoectomy.

This commit is contained in:
Eric S. Raymond 2017-06-08 05:21:20 -04:00
parent a8e8967814
commit 86e75219e3

56
main.c
View file

@ -712,33 +712,35 @@ L90: RSPEAK(23);
/* Okay, he's dead. Let's get on with it. */ /* Okay, he's dead. Let's get on with it. */
L99: if(game.closng) goto L95; L99: if(game.closng) {
game.numdie=game.numdie+1; /* He died during closing time. No resurrection. Tally up a
if(!YES(cmdin,79+game.numdie*2,80+game.numdie*2,54)) score(0); * death and exit. */
if(game.numdie == MAXDIE) score(0); RSPEAK(131);
game.place[WATER]=0; ++game.numdie;
game.place[OIL]=0; score(0);
if(TOTING(LAMP))game.prop[LAMP]=0; } else {
/* 98 */ for (J=1; J<=NOBJECTS; J++) { ++game.numdie;
I=NOBJECTS + 1 - J; if(!YES(cmdin,79+game.numdie*2,80+game.numdie*2,54))
if(!TOTING(I)) goto L98; score(0);
K=game.oldlc2; if(game.numdie == MAXDIE)
if(I == LAMP)K=1; score(0);
DROP(I,K); game.place[WATER]=0;
L98: /*etc*/ ; game.place[OIL]=0;
} /* end loop */ if(TOTING(LAMP))
game.loc=3; game.prop[LAMP]=0;
game.oldloc=game.loc; for (J=1; J<=NOBJECTS; J++) {
goto L2000; I=NOBJECTS + 1 - J;
if(TOTING(I)) {
/* He died during closing time. No resurrection. Tally up a death and exit. */ K=game.oldlc2;
if(I == LAMP)
L95: RSPEAK(131); K=1;
game.numdie=game.numdie+1; DROP(I,K);
score(0); }
}
game.loc=3;
game.oldloc=game.loc;
goto L2000;
}
/* Hints */ /* Hints */