I am working through the Game of Fifteen and have almost completed it, but the program does not return an exit code of 0, which I'm almost certain is due to my won function. Here's my code:
bool won(void)
{
for(int x = 1; x < d*d; x++)
{
for(int i = 0; i < d; i++)
{
for(int j = 0; j < d; j++)
{
if(board[i][j] != x)
{
return false;
}
}
}
}
return true;
}
And here's the check50 output: https://sandbox.cs50.net/checks/85d30ea5f0364778a3186595b9385731
Any help would be greatly appreciated. Thank you!