nextx = comx;
nexty = comy;
/* main move loop */
- for (ll = 1; ll <= nsteps; ll++) {
+ for (ll = 0; ll < nsteps; ll++) {
#ifdef DEBUG
if (idebug) {
- prout("%d", ll);
+ prout("%d", ll+1);
}
#endif
/* Check if preferred position available */
case IHB: /* Hit a base */
skip(1);
prout("***STARBASE DESTROYED..");
- for (ll=1; ll<=game.state.rembase; ll++) {
+ for_starbases(ll) {
if (game.state.baseqx[ll]==quadx && game.state.baseqy[ll]==quady) {
game.state.baseqx[ll]=game.state.baseqx[game.state.rembase];
game.state.baseqy[ll]=game.state.baseqy[game.state.rembase];
line = FSPY;
if (alldone) return;
datemin = fintim;
- for (l=1; l<=NEVENTS; l++)
+ for (l = 1; l <= NEVENTS; l++)
if (game.future[l] < datemin) {
line = l;
datemin = game.future[l];