no save
Assistance
Achat
News

Forum | programmation
[C++Builder]jeu Demineur
Madagascar1, le mer. 16 mai 2007 à 16:05:41
je t'envoie un ptt pgrm
c'est tous que j'ai pour le moment


class Boutton:public TButton
{
int num;
int etat;
//int nb_bombe;

public:
__fastcall Boutton(int x,int y,int num,int etat):TButton(Owner)
{
this->Width=20; //width=20;
this->Height=20;
this->Top=y;
this->Left=x;
this->num=num;
this->etat=etat;
this->Caption=IntToStr(etat);
this->Parent=Form1;
this->OnClick=clicker;
}
void __fastcall clicker(TObject *sender);
};
//---------------------------------------------------------------------------
// void __fastcall Boutton::clicker(TObject *sender)
// {
// ShowMessage(this->num);
// ShowMessage(this->etat);
//}
//---------------------------------------------------------------------------
//__fastcall TForm1::TForm1(TComponent* Owner)
// : TForm(Owner)
class jeu
{
int niveau;
int nbrbombe;
Boutton B[30][30];
public:
void __fastcall njk(int);
void __fastcall initBombe();
};
void __fastcall jeu::njk(int niveau)
{
this->niveau=niveau;
this->nbrbombe=niveau;
int o=1;
int k=1;
int state=1;
for(int i=1;i<niveau;i++)
{
int p=1;
for(int j=1;j<niveau;j++)
{
this->B[i][j]=new Boutton(o,p,k,state);
k++;
p+=20;
}
o+=20;
}
PrécédentStupeflip
mai 07
Madagascar1
mai 07
Suivant
REPONSES
lefoufighter
mai 07
Madagascar1
mai 07
lefoufighter
mai 07
Stupeflip
mai 07
Madagascar1
mai 07
Madagascar1
mai 07
Stupeflip
mai 07
Madagascar1
mai 07
Madagascar1
mai 07
Version Web
Réalisé par RedShift
no save