Exemplo n.º 1
0
    public WeightedDistances GetLongestPath()
    {
        //Distances distances = this.startingCell.FindDistanceForAllReachableLinkedCells();
        //MazeCell maxDistanceMazeCell = distances.MaxDistanceMazeCell();
        //Distances distancesFromMax = maxDistanceMazeCell.FindDistanceForAllReachableLinkedCells();
        //return distancesFromMax.DijkstraShortestPathTo(maxDistanceMazeCell);

        WeightedDistances distances = this.startingCell.FindDistanceForAllReachableLinkedCells().MaxDistanceMazeCell().FindDistanceForAllReachableLinkedCells();

        return(distances.DijkstraShortestPathTo(distances.MaxDistanceMazeCell()));
    }