code: private int check(TilePath tilePath,
                        int nextDepth,
                        int x,
                        int y,
                        Pathfindable mover,
                        int stx,
                        int sty,
                        int dtx,
                        int dty,
                        boolean ignoreRef,
                        Node current,
                        int maxDepth)
      {
          final MovementTile movement = MovementTile.from(x, y);
          if (mover.isMovementAllowed(tilePath.getCategory(), movement))
          {
              final int xp = x + current.getX();
              final int yp = y + current.getY();
  
              if (isValidLocation(mover, stx, sty, xp, yp, ignoreRef))
              {
                  return updateNeighbour(mover, dtx, dty, current, xp, yp, maxDepth);
              }
          }
          return nextDepth;
      }
docs: Update the open and closed list to find the path.
  
  @param tilePath The current tile.
  @param nextDepth The next depth value.
  @param x The current horizontal movement.
  @param y The current vertical movement.
  @param mover The entity that will be moving along the path.
  @param stx The x coordinate of the start location.
  @param sty The y coordinate of the start location.
  @param dtx The x coordinate of the destination location.
  @param dty The y coordinate of the destination location.
  @param ignoreRef The ignore map array reference checking (<code>true</code> to ignore references).
  @param current The current node.
  @param maxDepth The last max depth.
  @return The next max depth.