path creation no longer throws this

This commit is contained in:
Leijurv 2018-11-16 16:28:20 -08:00
parent 04e87c9810
commit 737c632227
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -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() {