The game already does this. Move a unit to the grey hexes on either the left of right side of the map and it will exit ( or withdraw if you prefer )at the end of the turn
Don
__________________
"You are never to old to rock and roll if you are too young to die".--- What do you expect to be doing when you are 80?