static void TestDijkstra() { using (DijkstraPathfinding path = new DijkstraPathfinding(new Size(10, 10), 1, (from, to) => Math.Abs(from.X - to.X) + Math.Abs(from.Y - to.Y))) { path.Compute(new Point(5, 5)); path.SetPath(new Point(1, 1)); Console.WriteLine(path.Length); Console.WriteLine(path.IsEmpty); Console.WriteLine(path[2]); foreach (var point in path.Generate()) { Console.WriteLine("\t" + point); } } }