Table of Contents

Method Select

Namespace
Gamelogic.Grids2
Assembly
Gamelogic.Grids2.dll

Select(IExplicitShape<int>, Func<int, bool>)

Returns a new shape that only contains points in this shape that satisfies the predicate.

[Obsolete("Use Where instead. This function was misnamed.")]
public static IExplicitShape<int> Select(this IExplicitShape<int> shape, Func<int, bool> predicate)

Parameters

shape IExplicitShape<int>

The shape to select points for the new shape from.

predicate Func<int, bool>

The predicate that all points in the new shape should satisfy.

Returns

IExplicitShape<int>

A new explicit shape that contains only points from the original shape that satisfies the predicate.

Select(IExplicitShape<GridPoint2>, Func<GridPoint2, bool>)

Returns a new shape that only contains points in this shape that satisfies the predicate.

[Obsolete("Use Where instead. This function was misnamed.")]
public static IExplicitShape<GridPoint2> Select(this IExplicitShape<GridPoint2> shape, Func<GridPoint2, bool> predicate)

Parameters

shape IExplicitShape<GridPoint2>

The shape to select points for the new shape from.

predicate Func<GridPoint2, bool>

The predicate that all points in the new shape should satisfy.

Returns

IExplicitShape<GridPoint2>

A new explicit shape that contains only points from the original shape that satisfies the predicate.

Select(IExplicitShape<GridPoint3>, Func<GridPoint3, bool>)

Returns a new shape that only contains points in this shape that satisfies the predicate.

[Obsolete("Use Where instead. This function was misnamed.")]
public static IExplicitShape<GridPoint3> Select(this IExplicitShape<GridPoint3> shape, Func<GridPoint3, bool> predicate)

Parameters

shape IExplicitShape<GridPoint3>

The shape to select points for the new shape from.

predicate Func<GridPoint3, bool>

The predicate that all points in the new shape should satisfy.

Returns

IExplicitShape<GridPoint3>

A new explicit shape that contains only points from the original shape that satisfies the predicate.