Advertisement
deadwing97

Untitled

Mar 9th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.43 KB | None | 0 0
  1. ( (safe(NX,NY),heuristic(NX,NY),recurse(NX,NY,Direction,NPath,NScore,ZROT));
  2.           ( not(Rotation \== 0) -> clockwise(Direction,NDir),append(Path,[[-1,-1]],Arot),Nrot is 1,recurse(X,Y,NDir,Arot,Score,Nrot);false);
  3.           ( not(Rotation \== 0) -> anticlockwise(Direction,NDir),append(Path,[[-2,-2]],Arot),Nrot is 1,recurse(X,Y,NDir,Arot,Score,Nrot);false);
  4.           (safe(NX,NY),not(heuristic(NX,NY)),recurse(NX,NY,Direction,NPath,NScore,ZROT))
  5.         ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement