public int Distance(Point here, Point there) { Contract.Requires(here != null); Contract.Requires(there != null); Contract.Requires(here.X >= 0 && here.Y >= 0); Contract.Requires(there.X >= 0 && there.Y >= 0); return Math.Max(Math.Abs(here.X - there.X), Math.Abs(here.Y - there.Y)); }