for (MovePath p : paths) {
if (!(p instanceof PossibleMovePath)) {
continue;
}
PossibleMovePath path = (PossibleMovePath)(p);
if (path.isEmpty()) {
continue;
}
MoveStep step = path.getFirstStep();
UnitMover.MoveInfo moveInfo
= unitMover.getMovementChanges(Game.getGame(), step);
if (moveInfo.canMoveNow()) {
try {
moveInfo.executeChanges();
path.removeFirstStep();
} catch (Exception ex) {
Messages.getMessages().err("MoveUnitsToWFAction",
"When trying to move units: "
+ ex);
System.exit(-1);