Sets the cell at (x, y) to cell. Does nothing if coordinates are out of bounds.
x
y
cell
void setCell(int x, int y, Cell cell) { if (x < 0 || x >= width || y < 0 || y >= height) return; cells[_index(x, y)] = cell; }