* @param realm Realm to execute the command
* @return CommandResult
*/
public CommandResult execute(Realm realm) {
if (unit == null) {
return new CommandResult(CommandResult.RESULT_ERROR, "Unit is null", CommandResult.NO_UPDATE);
}
if (movementPoints < 0) {
return new CommandResult(CommandResult.RESULT_ERROR, "movementPoints is less than zero", CommandResult.NO_UPDATE);
}
unit.setMovementPoints(movementPoints);
return new CommandResult(CommandResult.RESULT_OK, "");
}