path creation no longer throws this
This commit is contained in:
parent
04e87c9810
commit
737c632227
@ -149,12 +149,7 @@ public abstract class AbstractNodeCostSearch implements IPathFinder {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<IPath> pathToMostRecentNodeConsidered() {
|
public Optional<IPath> pathToMostRecentNodeConsidered() {
|
||||||
try {
|
return Optional.ofNullable(mostRecentConsidered).map(node -> new Path(startNode, node, 0, goal, context));
|
||||||
return Optional.ofNullable(mostRecentConsidered).map(node -> new Path(startNode, node, 0, goal, context));
|
|
||||||
} catch (IllegalStateException ex) {
|
|
||||||
System.out.println("Unable to construct path to render");
|
|
||||||
return Optional.empty();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int mapSize() {
|
protected int mapSize() {
|
||||||
|
Loading…
Reference in New Issue
Block a user