Sets the cell at (x, y) and updates dirty tracking.
x
y
void setCell(int x, int y, Cell? cell) => _setCell(x, y, cell, takeOwnership: false);