Magic-number elimination.
This commit is contained in:
parent
a3485d2a41
commit
900822d38f
2 changed files with 6 additions and 6 deletions
|
@ -174,11 +174,11 @@ static void blast(void)
|
||||||
if (game.prop[ROD2] < 0 || !game.closed)
|
if (game.prop[ROD2] < 0 || !game.closed)
|
||||||
RSPEAK(REQUIRES_DYNAMITE);
|
RSPEAK(REQUIRES_DYNAMITE);
|
||||||
else {
|
else {
|
||||||
game.bonus=133;
|
game.bonus=VICTORY_MESSAGE;
|
||||||
if (game.loc == LOC_NE)
|
if (game.loc == LOC_NE)
|
||||||
game.bonus=134;
|
game.bonus=DEFEAT_MESSAGE;
|
||||||
if (HERE(ROD2))
|
if (HERE(ROD2))
|
||||||
game.bonus=135;
|
game.bonus=SPLATTER_MESSAGE;
|
||||||
RSPEAK(game.bonus);
|
RSPEAK(game.bonus);
|
||||||
score(endgame);
|
score(endgame);
|
||||||
}
|
}
|
||||||
|
|
6
score.c
6
score.c
|
@ -65,11 +65,11 @@ void score(enum termination mode)
|
||||||
if(game.closed) {
|
if(game.closed) {
|
||||||
if(game.bonus == 0)
|
if(game.bonus == 0)
|
||||||
score += 10;
|
score += 10;
|
||||||
if(game.bonus == 135)
|
if(game.bonus == SPLATTER_MESSAGE)
|
||||||
score += 25;
|
score += 25;
|
||||||
if(game.bonus == 134)
|
if(game.bonus == DEFEAT_MESSAGE)
|
||||||
score += 30;
|
score += 30;
|
||||||
if(game.bonus == 133)
|
if(game.bonus == VICTORY_MESSAGE)
|
||||||
score += 45;
|
score += 45;
|
||||||
}
|
}
|
||||||
mxscor += 45;
|
mxscor += 45;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue