That doesn't solve the problem, you want the path to start and end at the same point, what you're doing would return true for a path like this: ['n','n','n','n','n','n','n','n','n','n'] where you can easily see you end at ten blocks from where you started.
That doesn't solve the problem, you want the path to start and end at the same point, what you're doing would return true for a path like this:
['n','n','n','n','n','n','n','n','n','n']
where you can easily see you end at ten blocks from where you started.