private bool AreRegionsAdjacent(NavigationRegion a, NavigationRegion b) { return(a == b || a.Above(b) || a.Below(b) || a.LeftOf(b) || a.RightOf(b)); }
// Return true if this region is left of compareTo. // If this is left of compareTo, then compareTo is right // of this, hence we call compareTo's RightOf function. public bool LeftOf(NavigationRegion compareTo) { return(compareTo.RightOf(this)); }