public static boolean equal(boolean[][] a, boolean[][] b) {
        if(a != null && b != null) {
            if(a.length == b.length) {
                for(int i = 0; i < a.length; i++) {
                    if(a[i].length == b[i].length) {
                        for(int j = 0; j < a[i].length; j++) {
                            if(a[i][j] != b[i][j]) {
                                return false;
                            }
                        }
                    } else {
                        return false;
                    }
                }
                return true;
            } else {
                return false;
            }            
        } else if(a == null && b == null) {
            return true;
        } else {
            return false;
        }
    }