- /* that should be good enough. Let's tell him all about it. */
- if(score+game.trnluz+1 >= mxscor && game.trnluz != 0)
- RSPEAK(242);
- if(score+game.saved+1 >= mxscor && game.saved != 0)
- RSPEAK(143);
- SETPRM(1,score,mxscor);
- SETPRM(3,game.turns,game.turns);
- RSPEAK(262);
- for (i=1; i<=CLSSES; i++) {
- if(CVAL[i] >= score) {
- SPEAK(CTEXT[i]);
- i=CVAL[i]+1-score;
- SETPRM(1,i,i);
- RSPEAK(263);
- 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)CLSSES; i++) {
+ if (classes[i].threshold >= points) {
+ speak(classes[i].message);
+ i = classes[i].threshold + 1 - points;
+ rspeak(NEXT_HIGHER, i, i);
+ exit(0);
+ }