commit method
Commit this operation into a cellMatrix
Implementation
@override
void commit(MatrixMap<CellDataType> matrix) {
// when trying to put an empty cell, free resources instead
if (cellData.isEmpty) {
matrix.remove(
colIndex: cellData.position.dx,
rowIndex: cellData.position.dy,
);
return;
}
matrix[cellData.position] = cellData;
}