public void handleTileClick(Tile tile) {
		panel.getMatchInfoPanel().setSurrenderPending(false); //Any tile click cancels surrendering.
		if (selectedTile != null) {
			if (range != null && selectedTile.hasUnit()) { //Actions can only happen if a unit is selected and a range is shown.
				if (range.getAbility() != null && range.getValidTargetPaths().containsKey(tile) && 
						tile.isOfType(range.getAbility().getTargetType(), getCurrentPlayer(), getTileOwner(tile)) && 
						selectedTile.getUnit().isActive()) {
					handleAbilityTargetClick(tile);
				} else if (range.getValidTargetPaths().containsKey(tile) && tile != selectedTile) {
					handleMoveTargetClick(tile);
				} else {
					handleTileSelectClick(tile); 
					//Always fall through to selecting the clicked tile if nothing else happens.
				}
			} else {
				handleTileSelectClick(tile);
			}
		} else {
			handleTileSelectClick(tile);
		}
	}