private static double GetManhattanDistance(ASquare a, ASquare b) { var dx = Math.Abs(a.X - b.X); var dy = Math.Abs(a.Y - b.Y); return(dx + dy); }
private static double GetEuclidDistance(ASquare a, ASquare b) { return(Math.Sqrt((a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y))); }