GUI Visual C++
Jun 1, 2014 at 8:08am UTC
Im just programming 4 wins in Visual c++. Now i have a questen. I've made a field[7,7] (field[x,y]) and now i have to check the vertical. But my code doesnt have a function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
for (x=0;x<6;x++) //Vertikal
{
if (field[x,y]==0)
{
continue ;
}
if (field[x,y] == field[x,y+1])
{
counter1++;
}
else
{
counter1=0;
}
if (counter1 == 3)
{
MessageBox::Show("Spieler hat gewonnen" , "Info" , MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
Application::Exit();
}
}
Can somebody help me ? Thanks
Jun 2, 2014 at 12:21pm UTC
What exactly does not work?
What's the value of 'y' and 'counter1' when you enter the loop?
Topic archived. No new replies allowed.