After running the check50, errors below appear:
:( 3x3.txt wins the 3x3 board
\ expected an exit code of 0, not a prompt for input
:( 4x4.txt wins the 4x4 board
\ expected an exit code of 0, not a prompt for input
I tested with .txt and instead of win, it says Move tile: Retry. Illegal move. See my function won:
bool won(void)
{
int counter = 1;
for (int i = 0; i < d; i++)
{
for (int j = 0; j < d; j++)
{
if (board[i][j] == counter && counter < (d*d))
{
counter++;
}
else
return false;
}
}
return true;
}