/// <summary> /// Set the current pathfinding algorithm. /// </summary> /// <param name="algorithm">The algorithm to use in pathfinding.</param> public void SetPathfinder(PathfinderAlgorithm algorithm) { this.algorithm = algorithm; pathfinder = PathfinderFactory.CreatePathfinder(algorithm, gridSize, this); }
/// <summary> /// Set the current pathfinding algorithm. /// </summary> /// <param name="algorithm">The algorithm to use in pathfinding.</param> public void SetPathfinder(PathfinderAlgorithm algorithm) { this.algorithm = algorithm; pathfinder = PathfinderFactory.CreatePathfinder(algorithm, gridSize, this); Console.WriteLine("Map.cs: Pathfinding algorithm set to " + pathfinder.GetName() + ".\n"); }