the red squares are not passable
the black squares are passable
the green dots( now white circles) are the path from 2,2 to 50,50
I think I found the bug, for some reason x and y are reversed..
try it .. now with n you can get a new random path ( all starting from 2,2)
thx for looking at it ;-)
if you have any suggestions for improvement, please do so