insertNodeOnMatrix method
Implementation
void insertNodeOnMatrix(NodeOutput item, State state, bool checkCollision) {
var mtx = state.mtx;
// check occupied here
if (checkCollision &&
(mtx.hasHorizontalCollision(state.x, state.y) ||
mtx.cellBusyForItem(item, state.x, state.y))) {
mtx.insertRowBefore(state.y);
}
mtx.insert(state.x, state.y, item);
this.markIncomesAsPassed(mtx, item);
return;
}