public ShortestPathResult GetGraph(IMazeCarver carver) { var graph = _graphBuilder.GetGraphFromMaze(carver); graph.Nodes[carver.StartPoint].ShortestPath = 0; ProcessGraph(graph); var node = graph.Nodes[carver.EndPoint]; return(new ShortestPathResult { Graph = graph, ShortestPath = node.ShortestPath, ShortestPathDirections = node.ShortestPathDirections }); }