Neco/LandView/LandViewUtils.cs
/// <summary>Gets a plot from the existing collection of plots that intersect with given new plot <br/>
/// This method is meant for finding if any existing plots intersect with a given plot</summary>
/// <param name="Existing"></param>
/// <param name="New"></param>
/// <returns>The ILandviewItem that intersects, or null if none was found</returns>
Gets a plot from the existing collection of plots that intersect with given new plot
This method is meant for finding if any existing plots intersect with a given plot
Gets a plot from the existing collection of plots that intersect with given new plot This method is meant for finding if any existing plots intersect with a given plot
public static Plot GetIntersectingPlot(ICollection<Plot> Existing, Plot New) {
            foreach (var Item in Existing) {
                if (Item.Equals(New)) { continue; } 
                if (Intersects(Item, New)) { return Item; }
            }
            return null;
        }
public static Plot GetIntersectingPlot ( ICollection < Plot > Existing , Plot New ) { foreach ( var Item in Existing ) { if ( Item . Equals ( New ) ) { continue ; } if ( Intersects ( Item , New ) ) { return Item ; } } return null ; }
Gets a plot from the existing collection of plots that intersect with given new plot
This method is meant for finding if any existing plots intersect with a given plot
Gets a plot from the existing collection of plots that intersect with given new plot This method is meant for finding if any existing plots intersect with a given plot
//If the new item already exists, then let's ignore it. We can't intersect with ourselves.
The ILandviewItem that intersects, or null if none was found
The ILandviewItem that intersects or null if none was found
Existing
ICollection<Plot>
None
New
Plot
None