Курсовая работа: Программа игры Кости
TForm2 *Form2;
int i=0;
int v=0;
int l=0;
int a,b,sum=0;
int h,x,st,ns;
// ---------------------------------------------------------------------------
__fastcall TForm2:: TForm2 (TComponent* Owner)
: TForm (Owner)
{
Form2->Caption = ("Êîñòè " + DateToStr (Now ()));
Button2->Enabled=false;
Button3->Enabled=false;
}
// ---------------------------------------------------------------------------
void __fastcall TForm2:: N4Click (TObject *Sender)
{
Form1->Close ();
}
// ---------------------------------------------------------------------------
void __fastcall TForm2:: Button2Click (TObject *Sender)
{
Button3->Enabled=true;
a=random (6) +1;
b=random (6) +1;
i=i+1;
Memo1->Lines->Add ("Èãðîê " + Label4->Caption);
Memo1->Lines->Add ("Áðîñîê ¹ " + IntToStr (i));
Memo1->Lines->Add ("Ïåðâûé êóáèê = " + IntToStr (a));