Minor doc and method name changes.

Respective tests updated.
This commit is contained in:
2020-04-24 15:08:59 -05:00
parent 8acc653b5b
commit ffc01f0ddf
2 changed files with 10 additions and 11 deletions

View File

@@ -43,7 +43,7 @@ public class DepthFirstSearch {
startNode = new DFSNode(null, x, y, endNode);
}
public void setDirectionPosition(int x, int y) {
public void setEndPosition(int x, int y) {
endNode = new DFSNode(null, x, y, endNode);
}
@@ -72,12 +72,11 @@ public class DepthFirstSearch {
}
/**
* Finds the end node. If an end node is set, it will try going in that
* direction first. Will not set end node if one wasn't found, therefore,
* previous end node data is kept.
* Finds a coordinate determined by a target validator. If an end node is set,
* it will try going in that direction first.
*
* @param targetValidator
* @return
* @return If it succeeded in finding an end node.
*/
public boolean findTarget(CoordinateTargetValidatable targetValidator) {
if (coordValidatable == null)