removed no longer need
In doExplore/5
doExplore(X,Y,D,L, Sequence):-
\+target(X,Y),
append(L, [visited(X,Y)], C),
append(Sequence, [turnright], S),
turnright(X,Y,D,L,S).
I see
append(L, [visited(X,Y)], C),
but then what happens with C
?
Since variables in Prolog are immutable you have to pass along the new variable C
.
Thanks for pointing it out. I’m not sure why if I pass in with C, it won’t even work. But if I pass in L, it works in some cases
Sorry which part or in what way should I reformat it?