// Randomize va RandomRange ga
// murojaat qilish uchun
// katak o’lchami 48x48
#define WC 48
#define HC 48
byte pole[4][4]; // o’yin maydoni
byte ex,ey; // bo’sh kataklar koordinatlari
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
Form1->Font->Size = 12;
}
// dastur isining boshlanishi
void __fastcall TForm1::FormShow(TObject *Sender)
{
NewGame();
}
// yangi o’yin
void __fastcall TForm1::NewGame()
{
// forma o’lchamini o’rnatish
ClientWidth = WC * 4 ;
ClientHeight = HC * 4;
// toshlarning boshlang’ich (to’g’ri) xolati
Do'stlaringiz bilan baham: