ASSIGNMENTS/AI-ASSIGNMENT 1/AI ASSIGNMENT-1-1ST HEURISTIC.c
//CHECKING WHETHER 2 MATRIX ARE EQUAL

CHECKING WHETHER 2 MATRIX ARE EQUAL
CHECKING WHETHER 2 MATRIX ARE EQUAL
bool checkmatrixn(node *a,node *b){
int i,j,k=0;
for(i=0;i<4;i++){
    for(j=0;j<4;j++){
        if(a->board[i][j]==b->board[i][j]){
            k++;
        }
    }
}
if(k==16)
    return true;
return false;
}
bool checkmatrixn ( node * a , node * b ) { int i , j , k = 0 ; for ( i = 0 ; i < 4 ; i ++ ) { for ( j = 0 ; j < 4 ; j ++ ) { if ( a -> board [ i ] [ j ] == b -> board [ i ] [ j ] ) { k ++ ; } } } if ( k == 16 ) return true ; return false ; }
CHECKING WHETHER 2 MATRIX ARE EQUAL
CHECKING WHETHER 2 MATRIX ARE EQUAL