static int getcoord(int atcpu)
{
- int ny, nx, c;
-
if (atcpu)
cgoto(cury,curx);
else
(void)refresh();
for (;;)
{
+ int ny, nx, c;
+
if (atcpu)
{
(void) mvprintw(CYBASE + BDEPTH+1, CXBASE+11, "(%d, %c)", curx, 'A'+cury);
static int awinna(void)
{
int i, j;
- ship_t *ss;
for(i=0; i<2; ++i)
{
- ss = (i) ? cpuship : plyship;
+ ship_t *ss = (i) ? cpuship : plyship;
for(j=0; j < SHIPTYPES; ++j, ++ss)
if(ss->length > ss->hits)
break;
return((ship_t *)NULL);
else /* sunk! */
{
- int i, j;
+ int i;
if (!closepack)
+ {
+ int j;
+
for (j = -1; j <= 1; j++)
{
int bx = ss->x + j * xincr[(ss->dir + 2) % 8];
}
}
}
+ }
for (i = 0; i < ss->length; ++i)
{
static int sgetc(const char *s)
{
const char *s1;
- int ch;
(void)refresh();
for(;;)
{
- ch = getch();
+ int ch = getch();
if (islower(ch))
ch = toupper(ch);
if (ch == CTRLC)