Gets the cell at (x, y). Returns null if coordinates are out of bounds.
x
y
Cell? getCell(int x, int y) { if (x < 0 || x >= width || y < 0 || y >= height) return null; return cells[_index(x, y)]; }