public PathFinderNode(CityPath path, PathFinderNode prev) { this.path = path; this.prev = prev; if (prev != null) { prev.next = this; } }
//Connect this node to next with the specified transportation type and turn radius, and return the path created. public CityPath Connect(CityNode next, CityPathType type, double radius) { if (next == null) { throw new Exception("Trying to connect a node to null"); } CityPath p = new CityPath(this, next, type, radius); paths.Add(p); return(p); }