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

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

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