getCell method

Cell? getCell(
  1. int x,
  2. int y
)

Gets the cell at (x, y). Returns null if coordinates are out of bounds.

Implementation

Cell? getCell(int x, int y) {
  if (x < 0 || x >= width || y < 0 || y >= height) return null;
  return cells[_index(x, y)];
}