get method

  1. @override
T get(
  1. int x,
  2. int y
)
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)];
}