UnitMovementAlgorithms
Types
Functions
Returns whether we can perform a swap move to the specified tile
Returns whether we can perform a unit swap move to the specified tile, given that it is reachable in the current turn
Does not consider if tiles can actually be entered, use canMoveTo for that. If a tile can be reached within the turn, but it cannot be passed through, the total distance to it is set to unitMovement
Does not consider if the destination tile can actually be entered, use canMoveTo for that. Returns an empty list if there's no way to get to the destination.
Returns the tiles to which we can perform a swap move
Swaps this unit with the unit on the given tile Precondition: this unit can swap-move to the given tile, as determined by canUnitSwapTo
Displace a unit - choose a viable tile close by if possible and 'teleport' the unit there. This will not use movement points or check for a possible route. It is used e.g. if an enemy city expands its borders, or trades or diplomacy change a unit's allowed position. CAN DESTROY THE UNIT.