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.
True when this handler should be called at the present state of the SBFGame (e.g. the phase). In that
case, handle() should be called.
handle
defaultvoidhandle()
Handles the action, e.g. attack with everything that's necessary, such as adding a report and sending changes to
the Clients. When the handler has finished handling the action and is no longer needed, it must call
setFinished() to mark itself as a candidate for removal.
isActionValid
defaultbooleanisActionValid()
setFinished
voidsetFinished()
execute
voidexecute()
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.
isFinished
booleanisFinished()
If it returns true, it must be removed from the list of active handlers (handling this action is finished
entirely). If it returns false, it must remain.
Returns:
False when this handler must remain active after doing its present handling, true otherwise