コード例 #1
0
ファイル: PathFinderNode.cs プロジェクト: hrsidkpi/TrafficSim
 public PathFinderNode(CityPath path, PathFinderNode prev)
 {
     this.path = path;
     this.prev = prev;
     if (prev != null)
     {
         prev.next = this;
     }
 }
コード例 #2
0
        //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);
        }