}
else
{
listboxOchki-> SetItemPart (NomHoda-1, 2, "0");
listboxOchki-> TopIndex = NomHoda-1;
}
}
else
{
if (DannieForTabl == yabrosil)
{
listboxOchki-> SetItemPart (NomHoda-1, 1, "" + IntToStr (MyCurOch));
listboxOchki-> TopIndex = NomHoda-1;
}
else if (DannieForTabl == yafixed)
{
listboxOchki-> SetItemPart (NomHoda-1, 1, "0");
listboxOchki-> TopIndex = NomHoda-1;
}
else if (DannieForTabl == hebrosil)
{
listboxOchki-> Items-> Add ("" + IntToStr (NomHoda) + ";;" + IntToStr (MasPriem [1]));
listboxOchki-> TopIndex = NomHoda-1;
if (NomHoda == 9)
{
listboxOchki-> Width = 236;
listboxOchki-> Left = 14;
}
}
else
{
listboxOchki-> Items-> Add ("" + IntToStr (NomHoda) + ";; 0");
listboxOchki-> TopIndex = NomHoda-1;
if (NomHoda == 9)
{
listboxOchki-> Width = 236;
listboxOchki-> Left = 14;
}
}
}
}
// ------------------------------ Результати -------------- ------------------------
void __ fastcall TMainForm :: ViProigrali (void)
{
IsVisitApplicationBox = true;
HisWinPoPartiam + +;
Application-> MessageBoxA ("Ви програли! nІграем далі!", "Поразка", MB_OK + MB_ICONEXCLAMATION);
InterfaceIgraemDalshe ();
IsVisitApplicationBox = false;
}
// ---------------------------------
void __ fastcall TMainForm :: ViViigrali (void)
{
IsVisitApplicationBox = true;
MyWinPoPartiam + +;
Application-> MessageBoxA ("Ви виграли! nІграем далі!", "Перемога!!", MB_OK + MB_ICONEXCLAMATION);
InterfaceIgraemDalshe ();
IsVisitApplicationBox = false;
}
// ----------------------------------
void __ fastcall TMainForm :: Nichia (void)
{
IsVisitApplicationBox = true;
MyWinPoPartiam + +;
HisWinPoPartiam + +;
Application-> MessageBoxA ("Ви зіграли внічию! nІграем далі!", "Нічия", MB_OK + MB_ICONEXCLAMATION);
InterfaceIgraemDalshe ();
IsVisitApplicationBox = false;
}
// --------------------------------------------- -------------------------------
void __ fastcall TMainForm :: menuOProgrClick (TObject * Sender)
{
FormAbout-> ShowModal ();
}
// ---------------------------- Інтерфейси ---------------- -----------------------
void __ fastcall TMainForm :: InterfaceBezIgri (void)
{
MyWholeOch = 0;
HisWholeOch = 0;
MyCurOch = 0;
NomHoda = 0;
IsYaFixed = false;
IsHeFixed = false;
NomPartia = 0;
MyWinPoPartiam = 0;
HisWinPoPartiam = 0;
ServerHostName = "";
ServerHostIP = "";
IsIgrayut = false;
menuStop-> Enabled = false;
panParam-> Visible = false;
lbNomPartia-> Visible = false;
panSchetPoPartiam-> Visible = false;
gbPole1-> Top = 15;
gbPole2-> Top = 15;
gbTabl-> Top = 15;
this-> Height = 400;
this-> Caption = "Ігрове поле";
btBrosit-> Enabled = false;
btFix-> Enabled = false;
btBrosit-> Color = clCream;
btFix-> Color = clCream;
shapeBrosil-> Brush-> Color = clSilver;
shapeFixed-> Brush-> Color = clSilver;
shapeBrosil-> Caption-> Font-> Color = clWhite;
shapeFixed-> Caption-> Font-> Color = clWhite;
lbMyWholeOch-> Caption = "0";
lbHisWholeOch-> Caption = "0";
lbMaxOch2-> Caption = "";
listboxOchki-> Clear ();
listboxOchki-> Width = 218;
listboxOchki-> Left = 23;
AnsiString tmp = AnsiQuotedStr ("Гра-> Почати нову гру", '"');
lbStat-> Caption = "Для початку нової гри виберете пункт меню "+ tmp;
}
// --------------------------------------------- -----------------
void __ fastcall TMainForm :: InterfaceBeginNewGame (void)
{
menuStop-> Enabled = true;
if (IsServer)
{
Caption = Caption + "Сервер";
imStolServer-> Parent = panPole1;
imStolClient-> Parent = panPole2;
}
else
{
Caption = Caption + "Клієнт";
imStolClient-> Parent = panPole1;
imStolServer-> Parent = panPole2;
}
for (int i = 0; i
{
Kubiki1 [i] = new TImage (this);
Kubiki1 [i] -> Parent = panPole1;
Kubiki1 [i] -> Transparent = true;
Kubiki2 [i] = ...