X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=score.c;h=368b1df439dfcc6f4e9eca5585d7443f8f9c0b3a;hp=ba7d98b7518ddbac1a4513f43726bfadf14f280f;hb=e7dc3eab5d7eb798199e59081e846582af7205a7;hpb=609159ad6d62af90cdbf97cbb09fffabde87a026 diff --git a/score.c b/score.c index ba7d98b..368b1df 100644 --- a/score.c +++ b/score.c @@ -1,11 +1,14 @@ +/* + * Scoring and wrap-up. + * + * Copyright (c) 1977, 2005 by Will Crowther and Don Woods + * Copyright (c) 2017 by Eric S. Raymond + * SPDX-License-Identifier: BSD-2-clause + */ #include #include "advent.h" #include "dungeon.h" -/* - * scoring and wrap-up - */ - static int mxscor; /* ugh..the price for having score() not exit. */ long score(enum termination mode) @@ -120,7 +123,7 @@ void terminate(enum termination mode) if (points + game.saved + 1 >= mxscor && game.saved != 0) rspeak(WITHOUT_SUSPENDS); rspeak(TOTAL_SCORE, points, mxscor, game.turns, game.turns); - for (long i = 1; i <= (long)NCLASSES; i++) { + for (int i = 1; i <= (long)NCLASSES; i++) { if (classes[i].threshold >= points) { speak(classes[i].message); i = classes[i].threshold + 1 - points;