Source code for init:
void init(void)
{
int k=(d*d)-1;
for(int row=0; row<d; row++){
for(int col=0; col<d; col++){
board[row][col]=k;
if((d%2==0)&&(k==3)){
k=1;
}
else if((d%2==0)&&(k==1)){
k=2;
}
else{k--;}
}
}
}
Error only in expected "0" character 7 of line 4, not "1" :( init initializes 4x4 board correctly )