@Override
    public List<Node> nextSteps() {
        List<Node> nextSteps = new ArrayList<>();

        int right = emptyIndexX + 1;
        boolean canMoveRight = puzzuleBoard.length > right;
        if ( canMoveRight ) {
            int[][] newBoard = copyBoard();
            newBoard[emptyIndexX][emptyIndexY] = newBoard[right][emptyIndexY];
            newBoard[right][emptyIndexY] = EMPTY;
            Node newNode = new PuzzuleNode(newBoard, right, emptyIndexY, currentDepth + 1, this);
            nextSteps.add(newNode);
        }

        int left = emptyIndexX - 1;
        boolean canMoveLeft = left > -1;
        if ( canMoveLeft ) {
            int[][] newBoard = copyBoard();
            newBoard[emptyIndexX][emptyIndexY] = newBoard[left][emptyIndexY];
            newBoard[left][emptyIndexY] = EMPTY;
            Node newNode = new PuzzuleNode(newBoard, left, emptyIndexY, currentDepth + 1,this);
            nextSteps.add(newNode);
        }

        int up = emptyIndexY + 1;
        boolean canMoveUp = puzzuleBoard[0].length > up;
        if ( canMoveUp ) {
            int[][] newBoard = copyBoard();
            newBoard[emptyIndexX][emptyIndexY] = newBoard[emptyIndexX][up];
            newBoard[emptyIndexX][up] = EMPTY;
            Node newNode = new PuzzuleNode(newBoard, emptyIndexX, up, currentDepth + 1,this);
            nextSteps.add(newNode);
        }

        int down = emptyIndexY - 1;
        boolean canMoveDown = down > -1;
        if ( canMoveDown ) {
            int[][] newBoard = copyBoard();
            newBoard[emptyIndexX][emptyIndexY] = newBoard[emptyIndexX][down];
            newBoard[emptyIndexX][down] = EMPTY;
            Node newNode = new PuzzuleNode(newBoard, emptyIndexX, down, currentDepth + 1,this);
            nextSteps.add(newNode);
        }

        return nextSteps;
    }