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
gridIGrid<TPoint, TCell>The grid to fill.
valueTCellThe value to fill the grid with.
Type Parameters
TPointThe point type of the grid.
TCellThe 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
gridIGrid<TPoint, TCell>The grid to fill.
generateItemFunc<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
TPointThe point type of the grid.
TCellThe 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
gridIGrid<TPoint, TCell>The grid to fill.
generateItemFunc<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
TPointThe point type of the grid.
TCellThe cell type of the grid.