move

abstract suspend fun move(destination: Location): Movable.MoveResult(source)

Tries to move the entity to the specified destination. If the entity cannot be moved to the location, the method returns a MoveResult that specifies whether the move was successful or not.

Return

a MoveResult that specifies whether the move was successful or not

Parameters

destination

the location to move the entity to