Курсовая работа: Программа "Морской бой"
vertical = true;
regen = true;
continue;
}
}
if(vertical)
{
if((CPU -> ship[i].desp_of_part[j].x == x1 &&
CPU -> ship[i].desp_of_part[j].y == y1 + k) ||
(y1 + k >= 10))
{
vertical = false;
regen = true;
continue;
}
if((CPU -> ship[i].desp_of_part[j].x – 1 == x1 ||
CPU -> ship[i].desp_of_part[j].x + 1 == x1) &&
(CPU -> ship[i].desp_of_part[j].y – 1 == y1 + k ||
CPU -> ship[i].desp_of_part[j].y + 1 == y1 + k))
{
vertical = true;
regen = true;
continue;
}
}
}
} while(regen);
if(! vertical)
for (i = 0; i < col_deck; i++)