Added random choice of direction to try when building loop
Before it was u,r,d,l -> now it uses a list with 4 directions, and pick randomly one, try,
and then try again if needed, etc... using pop in the list. (try 4 times)