game.landed = false;
game.alive = true;
game.docfac = 0.25;
- for_quadrants(i)
- for_quadrants(j) {
- struct quadrant *quad = &game.state.galaxy[i][j];
+ for (i = 1; i <= GALSIZE; i++)
+ for (j = 1; j <= GALSIZE; j++) {
+ struct quadrant *quad = &game.state.galaxy[i][j];
quad->charted = 0;
quad->planet = NOPLANET;
quad->romulans = 0;
game.lastchart = FOREVER;
// Put stars in the galaxy
game.instar = 0;
- for_quadrants(i)
- for_quadrants(j) {
+ for (i = 1; i <= GALSIZE; i++)
+ for (j = 1; j <= GALSIZE; j++) {
int k = Rand()*9.0 + 1.0;
game.instar += k;
game.state.galaxy[i][j].stars = k;
prout(_("a deadly Klingon invasion force. As captain of the United"));
prout(_("Starship U.S.S. Enterprise, it is your mission to seek out"));
prout(_("and destroy this invasion force of %d battle cruisers."),
- INKLINGTOT);
+ (game.inkling + game.incom + game.inscom));
prout(_("You have an initial allotment of %d stardates to complete"), (int)game.intime);
prout(_("your mission. As you proceed you may be given more time."));
skip(1);
else {
prout(_("Stardate %d."), (int)game.state.date);
skip(1);
- prout(_("%d Klingons."), INKLINGTOT);
+ prout(_("%d Klingons."), game.inkling + game.incom + game.inscom);
prout(_("An unknown number of Romulans."));
if (game.state.nscrem)
prout(_("And one (GULP) Super-Commander."));
game.ientesc = true;
}
// Clear quadrant
- for_sectors(i)
- for_sectors(j)
+ for (i = 1; i <= QUADSIZE; i++)
+ for (j = 1; j <= QUADSIZE; j++)
game.quad[i][j] = IHDOT;
q = &game.state.galaxy[game.quadrant.x][game.quadrant.y];
// cope with supernova
for (i = 1; i <= game.klhere; i++)
w = newkling(i);
// If we need a commander, promote a Klingon
- for_commanders(i)
+ for (i = 1; i <= game.state.remcom; i++)
if (same(game.state.kcmdr[i], game.quadrant))
break;
}
}
- sortkl();
+ sortklings();
// Put in a few black holes
for (i = 1; i <= 3; i++)
}
}
-void sortkl(void)
+void sortklings(void)
/* sort Klingons by distance from us */
{
double t;