Wiki

Clone wiki

RogueSharp / RogueSharp / IGoalMap / FindPaths

IGoalMapFindPaths Method

Returns a ReadOnlyCollection of Paths representing all of the shortest paths from the specified location to the Goal or Goals determined to have the highest priority This method is useful when there are multiple paths that would all work and we want to have some additional logic to pick one of the best paths The FindPath( int x, int y ) method in the GoalMap class uses this method and then chooses the first path.

Namespace: RogueSharp
Assembly:

Syntax

ReadOnlyCollection<Path> FindPaths(
    int x,
    int y
)

Parameters

x

Type: SystemInt32
X location of the beginning of the path, starting with 0 as the farthest left

y

Type: SystemInt32
Y location of the beginning of the path, starting with 0 as the top

Return Value

Type: ReadOnlyCollectionPath
A ReadOnlyCollection of Paths representing all of the shortest paths from the specified location to the Goal or Goals determined to have the highest priority

See Also

Reference

IGoalMap Interface
RogueSharp Namespace

[4]: 2014-2016 Faron Bracy

Updated