empties the board, both the plans and anything undone
Hands the plans to the caller and empties the board - the moment a turn stops being a plan. The orders are returned in planning order.
adds or replaces a unit's plan; clears the redo stack, as planning after undo does
puts the last undone plan back, replacing any plan the unit has picked up since
takes the last plan off the board, returning it so a caller can put it back
The planned-but-uncommitted orders of a turn - Wesnoth's whiteboard - with undo across them.
A plan is one entry per unit, so replanning a unit replaces its earlier order in place rather than stacking a second one for the same unit: what is on the board is the turn as it would be played, not the history of how a player got there. Undo pops the last plan onto a redo stack (planning again clears that stack, the usual undo contract), and
commithands the plans to the caller, which is where the framework stops - actually executing them is the game's turn.Example