static char sccsid
[] = "@(#)lrscan.c 4.1 (Berkeley) %G%";
** LONG RANGE OF SCANNERS
** A summary of the quadrants that surround you is printed. The
** hundreds digit is the number of Klingons in the quadrant,
** the tens digit is the number of starbases, and the units digit
** is the number of stars. If the printout is "///" it means
** that that quadrant is rendered uninhabitable by a supernova.
** It also updates the "scanned" field of the quadrants it scans,
** for future use by the "chart" option of the computer.
printf("Long range scan for quadrant %d,%d\n\n", Ship
.quadx
, Ship
.quady
);
/* print the header on top */
for (j
= Ship
.quady
- 1; j
<= Ship
.quady
+ 1; j
++)
if (j
< 0 || j
>= NQUADS
)
for (i
= Ship
.quadx
- 1; i
<= Ship
.quadx
+ 1; i
++)
printf("\n -------------------\n");
if (i
< 0 || i
>= NQUADS
)
/* negative energy barrier */
printf(" ! * ! * ! * !");
/* print the left hand margin */
for (j
= Ship
.quady
- 1; j
<= Ship
.quady
+ 1; j
++)
if (j
< 0 || j
>= NQUADS
)
/* negative energy barrier again */
q
->scanned
= q
->klings
* 100 + q
->bases
* 10 + q
->stars
;
printf(" %3d !", q
->scanned
);
printf("\n -------------------\n");