1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| int nb=1;
for(int j=NB_BLOCS_HAUTEUR-1;j>0;j--)
{
bool complet = true;
for(int i=0;i<NB_BLOCS_LARGEUR;i++)
{
if(carte[i][j] == 0)
complet = false;
}
if(complet == true)
{
nb ++;
compteur+=100;
FSOUND_PlaySound(FSOUND_FREE, casse);// Pour generer un son pendant la suppression d'un ligne
for(int k=j;k>0;k--)
{
for(int i=0;i<NB_BLOCS_LARGEUR;i++)
carte[i][k] = carte[i][k-1];
}
for(int i=0;i<NB_BLOCS_LARGEUR;i++)
{
carte[i][0] = 0;
}
}
}
if( nb == 4)
{
FSOUND_PlaySound(FSOUND_FREE, yeah1);
compteur+=400;
}
if(nb == 3)
{
FSOUND_PlaySound(FSOUND_FREE, yeah);
compteur+=300;
} |
Partager