get method
override
Returns the cell at the given x
and y
coordinates.
Throws if the coordinates are out of bounds.
Implementation
@override
T get(int x, int y) {
assert(
x >= 0 && x < width && y >= 0 && y < height,
'($x, $y) is out of bounds ($width, $height)',
);
return cells[_indexOf(x, y)];
}