the 2 black arrows.
the loop continues through the top left corner, over the second square in the first row and continues to the top right corner as there are no arrows pointing to lines going down. then it runs in a u-turn around the top right square.
now if you look from the third square in the bottom row, the loop can't run directly left of it, so the closest distance is 1. this means the minimal distance above it is 2 as there is no arrow pointing in that direction. so the loop continues left and then down.
the line has to be a minimal distance of 1 from the last 