Buffer constructor
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));
}