Interface Pathfinder

    • Method Detail

      • search

        Result search​(int[][] grid,
                      int startCol,
                      int startRow,
                      int endCol,
                      int endRow)
        Performs a search for a path from given starting coordinates to the given end coordinates on the given grid.
        Parameters:
        grid - map to perform the search on
        startCol - start column
        startRow - start row
        endCol - end column
        endRow - end row
        Returns:
        Result object which contains information such as the length of the optimal path
      • buildPath

        default void buildPath​(Node node,
                               int[][] map)
        Draws the path found by the algorithm to the map provided.
        Parameters:
        node - The end node of the path
        map - The map to draw the path into