#include <string.h>
#include <time.h>
-void dstrct()
+void selfdestruct(void)
+/* self-destruct maneuver */
{
/* Finish with a BANG! */
chew();
int l=1;
while (l <= game.nenhere) {
if (game.kpower[l]*game.kdist[l] <= whammo)
- deadkl(game.ks[l], game.quad[game.ks[l].x][game.ks[l].y], game.ks[l].x, game.ks[l].y);
+ deadkl(game.ks[l], game.quad[game.ks[l].x][game.ks[l].y], game.ks[l]);
l++;
}
}
}
-void finish(FINTYPE ifin)
+void finish(FINTYPE ifin)
+/* end the game, with appropriate notfications */
{
bool igotit = false;
game.alldone = true;
proutn(_("Do you want your Commodore Emeritus Citation printed? "));
chew();
if (ja() == true) {
- igotit = 1;
+ igotit = true;
}
}
}
prout(_("LIVE LONG AND PROSPER."));
}
score();
- if (igotit != 0) plaque();
+ if (igotit) plaque();
return;
case FDEPLETE: // Federation Resources Depleted
prout(_("Your time has run out and the Federation has been"));
}
void score(void)
+/* compute player's score */
{
double timused = game.state.date - game.indate;
int ithperd, iwon, klship;
prout(_("TOTAL SCORE %5d"), iscore);
}
-void plaque(void) {
+void plaque(void)
+/* emit winner's commemmorative plaque */
+{
FILE *fp=NULL;
time_t t;
char *timestring;