public int compareTo(Puzzle other) {
        int out = 0;
        if ((this != null) && (other != null)) {
            for (int i = 0; i < this.getHeight(); i++) {
                for (int j = 0; j < this.getLength(); j++) {
                    if (this.getValue(i, j) != other.getValue(i, j)) {
                        out++;
                        //System.out.println("entro");
                    }
                }
            }
        } else {
            out = -1;
        }
        return out;
    }