Курсовая работа: Программа "Морской бой"
int i, j, n;
bool destroy;
TImage *Im;
Ship ship[10];
Flot (TImage *I)
{
destroy = false;
Im = I;
n = 1;
for (i = 0; i < 10; i++)
{
if (i < 6) n = 2;
if (i < 3) n = 3;
if (i == 0) n = 4;
ship[i].destroy = false;
ship[i].col_deck = n;
ship[i].decks = new bool[n];
ship[i].desp_of_part = new TPoint[n];
}
}
int GetStatus();
};
class AI
{
public:
TPoint decks_[20];
int col_decks_;
int Generation (Flot *CPU, int col_ship, int col_deck);
};