Class MoveActionHandler
java.lang.Object
megamek.common.autoResolve.acar.handler.AbstractActionHandler
megamek.common.autoResolve.acar.handler.MoveActionHandler
- All Implemented Interfaces:
ActionHandler
,SimulationManagerHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
cares()
void
execute()
Executes the action Here I use "orElseThrow" in most optionals inside the implementations because those optionals were already checked before in the Action#isDataValid(Object) call, and if any of them that should not be empty is empty then it is checked first in the action itself.Methods inherited from class megamek.common.autoResolve.acar.handler.AbstractActionHandler
getAction, isFinished, setFinished, simulationManager
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface megamek.common.autoResolve.acar.action.ActionHandler
handle, isActionValid
Methods inherited from interface megamek.common.autoResolve.acar.manager.SimulationManagerHelper
game
-
Constructor Details
-
MoveActionHandler
-
-
Method Details
-
cares
public boolean cares()- Returns:
- True when this handler should be called at the present state of the SBFGame (e.g. the phase). In that
case,
ActionHandler.handle()
should be called.
-
execute
public void execute()Description copied from interface:ActionHandler
Executes the action Here I use "orElseThrow" in most optionals inside the implementations because those optionals were already checked before in the Action#isDataValid(Object) call, and if any of them that should not be empty is empty then it is checked first in the action itself.
-