Ejemplo n.º 1
0
 /// <summary>
 /// Gets a list of StarSystems that surround the starting system.  The distance between the
 /// starting system and the ending system defines the radius of the search circle.
 /// </summary>
 /// <param name="start">The starting point</param>
 /// <param name="end">The goal system</param>
 /// <returns>A list of systems inside the radius of the search circle</returns>
 private IEnumerable<StarSystem> GetLocalSystems(StarSystem start, StarSystem end)
 {
     double radius = start.DistanceFrom(end);
     return provider.Systems.Where(s => s.DistanceFrom(start) <= radius);
 }
Ejemplo n.º 2
0
 private double CalculateEdgeWeight(StarSystem a, StarSystem b)
 {
     return a.DistanceFrom(b);
 }