public class RandomSelfGeneratingNode
This Node is able to randomly generate its own neighbors via the getNeighbors() method. The number of neighbors
and possible distances to the neighbors are determined in the constructor. The first instance of this node is generally
the start node used in algorithms. The goal node is just a regular node that is automatically linked to this set
when the dynamically created nodes come within range of the goal node.
Note: Because the nodes are randomly generated, there is no guarantee they will come within range of the goal node
and successfully link up. However, in practice they will always connect if you use enough connections (minimum 3-4) and
a long enough maxDist.
Fields inherited from class lejos.robotics.pathfinding.Node
When this method is called the first time, it randomly generates a set of neighbors according to
the parameters in the constructor. It then calls addNeighbor() for each one. The next time getNeighbors() is called
it will return the same set of neighbors it initially generated.
Each of these neighbors is a RandomSelfGeneratingNode too, so when their neighbors are requested they will also
self-generate a set of neighbors.
Each random node will also add the "parent" node to its list of neighboring nodes.
If a goal node was added, it checks if the node is within maxDist of the goal node. If it is, both the goal node and
this node add each other as neighbors.