The game compiles and runs, passing all the other tests in check50 when entered manually, but on the step for testing init, check50 fails.
Here's the check50 output: https://sandbox.cs50.net/checks/309ade0761e44143bd6786aae3be531b
I have no idea what the error means. Could it be a problem in the math library? This is the code for init:
void init(void)
{
int maxvalue = d*d-1;
for(int i = 0; i < d - 1; i++) {
for(int j = 0; j < d; j++){
board[i][j] = maxvalue;
maxvalue--;
}
}
for(int i = 0; i < d-1; i++) {
board[d-1][i] = bottomrow;
bottomrow--;
}
if(d % 2 == 0){
board[d-1][d-2] = 2;
board[d-1][d-3] = 1;
}
}
bottomrow
and where is it initialized? I'm also curious why you felt it was necessary to initialize the last row with a separate loop. – Cliff B Jul 24 '16 at 20:40