private bool SharesSpace(Wall otherWall) { bool overlaps = Equals(otherWall); overlaps |= DoesContainPoint(otherWall.Beginning()) || DoesContainPoint(otherWall.End()); overlaps |= otherWall.DoesContainPoint(Beginning()) || otherWall.DoesContainPoint(End()); return(overlaps); }
private bool OutOfWallBorder(Wall occupied, Wall entire) { return(occupied.DoesContainPoint(entire.Beginning()) || occupied.DoesContainPoint(entire.End())); }