August 2018
Beginner
334 pages
10h 19m
English
This time, we will need to implement a different BuildPath function, in case you have followed along with the previous path-finding recipes. Otherwise, we will need to implement this method, which we haven't defined yet:
private List<Vertex> BuildPath(Vertex v)
{
List<Vertex> path = new List<Vertex>();
while (!ReferenceEquals(v, null))
{
path.Add(v);
v = v.prev;
}
return path;
}
Read now
Unlock full access