private List<MazeCell> getNNodesDiagonal(MazeCell node) {
        ArrayList<MazeCell> nbrs = new ArrayList<>();
        int x = node.getX();
        int y = node.getY();
        int xmin = x;
        int xmax = x;
        int ymin = y;
        int ymax = y;

        if (x - 1 >= 0) {
            xmin = x - 1;
        }
        if (x + 1 < allCells.length) {
            xmax = x + 1;
        }
        if (y - 1 >= 0) {
            ymin = y - 1;
        }
        if (y + 1 < allCells.length) {
            ymax = y + 1;
        }

        for (int i = xmin; i <= xmax; i++) {
            for (int k = ymin; k <= ymax; k++) {
                if (allCells[i][k] != null) {
                    if (!allCells[i][k].equals(node)) { //Not the node istelf
                        nbrs.add(allCells[i][k]);
                    }
                }
            }
        }
        return nbrs;
    }