I want to update the int line every time a line is cleared in my tetris game. And I want to tell how many lines are cleared at once so I can adjust the score accordingly....
Code:
void ClearLine()
{
int num;
static int line;
for(int j = 20; j > 0; j--)
{
num = 0;
for(int i = 0; i < 10; i++)
{
if(map[i][j] != (BITMAP*)data[Blank].dat) num++;
}
if(num == 10)
{
line++;
Current.lines++;
for(int l= j; l >= 1; l--)
for(int k = 0; k < 10; k++)
{
map[k][l] = map[k][l - 1];
}
}
}
if(line == 1) score += 1000;
if(line == 2) score += 2000;
line = 0;
}
now it always adds only 1000... never 2000... how can I make it wait to see howmany are cleared at once?