private bool Overlap(Rect a, Rect b) { return ((((a.xMin < b.xMax) && (a.xMax > b.xMin)) && (a.yMin < b.yMax)) && (a.yMax > b.yMin)); }