So this is my code:
bool won(void)
{
// check number
int number = 1;
for(int row = 0; row < d; row++)
{
for(int column = 0; column < d; column++)
{
if(number == (d * d) - 1)
{
return true;
}
if(board[row][column] == number)
{
number++;
}
else
{
number = 1;
return false;
}
}
}
return false;
}
When I play the game, and beat it, the function works, check50 gives me a thumbs up for the 4x4, but for the 3x3 it doesn't, where am I going wrong?