code: public List<GridNode> getSurroundingNodes() {
          List<GridNode> nodes = new ArrayList<GridNode>();
          Direction[] orderedDirs = Direction.getOrderedDirs();
          for( int i = 0; i < orderedDirs.length; i++ ) {
              Direction direction = orderedDirs[i];
              int newCol = col + direction.col;
              int newRow = row + direction.row;
              if (isInRaster(newCol, newRow)) {
                  GridNode node = new GridNode(gridIter, cols, rows, xRes, yRes, newCol, newRow);
                  if (node.isValid()) {
                      nodes.add(node);
                  } else {
                      nodes.add(null);
                  }
              } else {
                  nodes.add(null);
              }
          }
          return nodes;
      }
docs: Gets all surrounding {@link GridNode nodes}, starting from the most eastern.
  
  Note that the list contains all 8 directions, but some might be null, if outside a boundary
  
  @return the nodes surrounding the current node.