Table of Contents

Method Apply

Namespace
Gamelogic.Grids2
Assembly
Gamelogic.Grids2.dll

Apply<TPoint, TCell>(IGrid<TPoint, TCell>, Action<TPoint>)

Applies an action for each cell in the grid.

public static void Apply<TPoint, TCell>(this IGrid<TPoint, TCell> grid, Action<TPoint> action)

Parameters

grid IGrid<TPoint, TCell>

The grid for which the action is applied.

action Action<TPoint>

The action to apply for each point. The action is called with the point as parameter.

Type Parameters

TPoint

The point type of the grid.

TCell

The cell type of the grid.

Apply<TPoint, TCell>(IGrid<TPoint, TCell>, Action<TCell>)

Applies an action for each cell in the grid.

public static void Apply<TPoint, TCell>(this IGrid<TPoint, TCell> grid, Action<TCell> action)

Parameters

grid IGrid<TPoint, TCell>

The grid for which the action is applied.

action Action<TCell>

The action to apply for each point. The action is called with the cell as parameter.

Type Parameters

TPoint

The point type of the grid.

TCell

The cell type of the grid.