- /* that should be good enough. Let's tell him all about it. */
- if(score+game.trnluz+1 >= mxscor && game.trnluz != 0)
- RSPEAK(TOOK_LONG);
- if(score+game.saved+1 >= mxscor && game.saved != 0)
- RSPEAK(WITHOUT_SUSPENDS);
- SETPRM(1,score,mxscor);
- SETPRM(3,game.turns,game.turns);
- RSPEAK(TOTAL_SCORE);
- for (long i=1; i<=(long)CLSSES; i++) {
- if(CVAL[i] >= score) {
- newspeak(class_messages[i]);
- i=CVAL[i]+1-score;
- SETPRM(1,i,i);
- RSPEAK(NEXT_HIGHER);
- exit(0);
- }
+ return score;
+}
+
+void terminate(enum termination mode)
+/* End of game. Let's tell him all about it. */
+{
+ long points = score(mode);
+
+ if (points + game.trnluz + 1 >= mxscor && game.trnluz != 0)
+ rspeak(TOOK_LONG);
+ 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++) {
+ if (classes[i].threshold >= points) {
+ speak(classes[i].message);
+ i = classes[i].threshold + 1 - points;
+ rspeak(NEXT_HIGHER, i, i);
+ exit(0);
+ }