Buffer constructor

Buffer(
  1. int width,
  2. int height,
  3. [Cell fill = Cell.empty]
)

Creates a new buffer with the given width and height.

The buffer is initialized with fill cells.

The width and height must be non-negative.

Implementation

factory Buffer(int width, int height, [Cell fill = Cell.empty]) {
  return Buffer._(Grid(width, height, fill));
}