this.quadMap = quadMap;
}
public void actionPerformed(FunctionActionEvent e) {
Set<MovePath> paths = quadMap.getDisplayedMovePaths();
UnitMover unitMover = quadMap.getUnitMover();
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();