public static CellsInfo ScanSquare(this Grid grid, GridPoint point) { if (grid == null) { throw new ArgumentNullException(nameof(grid)); } if (point.Row > grid.RowCount || point.Column > grid.ColumnCount) { throw new ArgumentOutOfRangeException(nameof(point)); } return(ScanCells(grid, GridPointGenerator.GenerateSquare(point))); }
public static NumbersBinary AppendSquare(this NumbersBinary numbers, Grid grid, GridPoint point) { if (grid == null) { throw new ArgumentNullException(nameof(grid)); } if (point.Row > grid.RowCount || point.Column > grid.ColumnCount) { throw new ArgumentOutOfRangeException(nameof(point)); } return(AppendCells(numbers, grid, GridPointGenerator.GenerateSquare(point))); }