Example #1
0
 public NodeRoute <T> CopyRoute()
 {
     return(new NodeRoute <T>()
     {
         NodesToTake = NodesToTake.Select(t => t).ToList(),
         DestinationReached = DestinationReached,
         NodeStart = NodeStart,
         NodeEnd = NodeEnd
     });
 }
Example #2
0
        public override string ToString()
        {
            var steps = string.Join("->", NodesToTake.Select(n => n.NodeIndex));

            return($"Route from {NodeStart.NodeIndex} to {NodeEnd.NodeIndex} | Reached? {DestinationReached} | steps {steps} ({RouteLength}) ");
        }