8081828384858687888990
if (apply_strategies) { CompoundCommand c = grid.applyStrategies(); if (!undoStack.isEmpty()) { Command last_edge_action = undoStack.pop(); last_edge_action.undo(); c.add(last_edge_action); } c.execute(); undoStack.add(c); }