code: protected static void considerStep (Info info, Node n, int x, int y, int cost)
      {
          // skip node if it's outside the map bounds or otherwise impassable
          if (!info.isStepValid(n.x, n.y, x, y)) {
              return;
          }
  
          // calculate the new cost for this node
          int newg = n.g + cost;
  
          // make sure the cost is reasonable
          if (newg > info.maxcost) {
  //            Log.info("Rejected costly step.");
              return;
          }
  
          // retrieve the node corresponding to this location
          Node np = info.getNode(x, y);
  
          // skip if it's already in the open or closed list or if its
          // actual cost is less than the just-calculated cost
          if ((np.closed || info.open.contains(np)) && np.g <= newg) {
              return;
          }
  
          // remove the node from the open list since we're about to
          // modify its score which determines its placement in the list
          info.open.remove(np);
  
          // update the node's information
          np.parent = n;
          np.g = newg;
          np.h = getDistanceEstimate(np.x, np.y, info.destx, info.desty);
          np.f = np.g + np.h;
  
          // remove it from the closed list if it's present
          np.closed = false;
  
          // add it to the open list for further consideration
          info.open.add(np);
          _considered++;
      }
docs: Consider the step <code>(n.x, n.y)</code> to <code>(x, y)</code> for possible inclusion
  in the path.
  
  @param info the info object.
  @param n the originating node for the step.
  @param x the x-coordinate for the destination step.
  @param y the y-coordinate for the destination step.