Method Fill
Fill<TPoint, TCell>(IGrid<TPoint, TCell>, TCell)
Sets each cell in the grid to the given value.
public static void Fill<TPoint, TCell>(this IGrid<TPoint, TCell> grid, TCell value)
Parameters
grid
IGrid<TPoint, TCell>The grid to fill.
value
TCellThe value to fill the grid with.
Type Parameters
TPoint
The point type of the grid.
TCell
The cell type of the grid.
Fill<TPoint, TCell>(IGrid<TPoint, TCell>, Func<TCell>)
Sets each cell in the grid to the value returned by a given function.
public static void Fill<TPoint, TCell>(this IGrid<TPoint, TCell> grid, Func<TCell> generateItem)
Parameters
grid
IGrid<TPoint, TCell>The grid to fill.
generateItem
Func<TCell>A function that returns a value that is assigned to each cell. The function is called for each point in the grid.
Type Parameters
TPoint
The point type of the grid.
TCell
The cell type of the grid.
Fill<TPoint, TCell>(IGrid<TPoint, TCell>, Func<TPoint, TCell>)
Sets each cell in the grid to the value returned by a given function.
public static void Fill<TPoint, TCell>(this IGrid<TPoint, TCell> grid, Func<TPoint, TCell> generateItem)
Parameters
grid
IGrid<TPoint, TCell>The grid to fill.
generateItem
Func<TPoint, TCell>A function that returns a value that is assigned to each cell. The function is called for each point in the grid, and the point is passed as parameter to the function.
Type Parameters
TPoint
The point type of the grid.
TCell
The cell type of the grid.