Table of Contents

Class Grid2<TCell>

Namespace
Gamelogic.Grids2
Assembly
Gamelogic.Grids2.dll

A 2D implementation of a IGrid<TPoint, TCell>.

public sealed class Grid2<TCell> : AbstractGrid<GridPoint2, TCell>, IGrid<GridPoint2, TCell>, IGrid<GridPoint2>, IExplicitShape<GridPoint2>, IImplicitShape<GridPoint2>, IEnumerable<PointCellPair<GridPoint2, TCell>>, IEnumerable

Type Parameters

TCell

The cell type of this grid.

Inheritance
Grid2<TCell>
Implements
Inherited Members
Extension Methods

Constructors

Grid2(IExplicitShape<GridPoint2>)

Initializes a new instance of the Grid1<TCell> class with the specified shape. Cells are not initialized, they have the default value of type TCell.

Properties

Bounds

Returns a bounding shape that contains this explicit shape.

this[GridPoint2]

Gets or sets the cell at the specified point.

Points

Gets all the points this shape contains.

Methods

CloneStructure<TNewCell>()

Returns a grid with exactly the same structure, but potentially holding elements of a different type.

Contains(GridPoint2)

Determines whether this implicit shape contains the specified point.

GetHexSpiralIterator(GridPoint2, int)
GetSpiralIterator(GridPoint2, int)

See Also

IGrid<TPoint, TCell>