Table of Contents

Method Transform

Namespace
Gamelogic.Grids2
Assembly
Gamelogic.Grids2.dll

Transform<TPoint, TCell>(IGrid<TPoint, TCell>, Func<TCell, TCell>)

Transforms the contents of a grid using a given transform.

public static void Transform<TPoint, TCell>(this IGrid<TPoint, TCell> grid, Func<TCell, TCell> transform)

Parameters

grid IGrid<TPoint, TCell>

The grid to transform.

transform Func<TCell, TCell>

The transform, called on each point in the grid with the cell at that point as parameter. The result is replaced at that point.

Type Parameters

TPoint

The point type of the grid.

TCell

The cell type of the grid.

Transform<TPoint, TCell>(IGrid<TPoint, TCell>, Func<TPoint, TCell, TCell>)

Transforms the contents of a grid using a given transform.

public static void Transform<TPoint, TCell>(this IGrid<TPoint, TCell> grid, Func<TPoint, TCell, TCell> transform)

Parameters

grid IGrid<TPoint, TCell>

The grid to transform.

transform Func<TPoint, TCell, TCell>

The transform, called on each point in the grid with the point and cell at that point as parameters. The result is replaced at that point.

Type Parameters

TPoint

The point type of the grid.

TCell

The cell type of the grid.