Guest User

Untitled

a guest
Dec 10th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1.  
  2. % there are no closer pieces along an edge
  3.  
  4. :- edge(P1,P2,north),
  5. Y < Y1,
  6. Y2 < Y,
  7. P1 != P,
  8. P1 != P2,
  9. P != P2,
  10. at_y(P1,Y1),
  11. at_y(P,Y),
  12. at_y(P2,Y2),
  13. at_x(P1,X),
  14. at_x(P,X),
  15. at_x(P2,X).
  16.  
  17. :- edge(P1,P2,south),
  18. Y > Y1,
  19. Y2 > Y,
  20. P1 != P,
  21. P1 != P2,
  22. P != P2,
  23. at_y(P1,Y1),
  24. at_y(P,Y),
  25. at_y(P2,Y2),
  26. at_x(P1,X),
  27. at_x(P,X),
  28. at_x(P2,X).
  29.  
  30. :- edge(P1,P2,west),
  31. X < X1,
  32. X2 < X,
  33. P1 != P,
  34. P1 != P2,
  35. P != P2,
  36. at_x(P1,X1),
  37. at_x(P,X),
  38. at_x(P2,X2),
  39. at_y(P1,Y),
  40. at_y(P,Y),
  41. at_y(P2,Y).
  42.  
  43. :- edge(P1,P2,east),
  44. X > X1,
  45. X2 > X,
  46. P1 != P,
  47. P1 != P2,
  48. P != P2,
  49. at_x(P1,X1),
  50. at_x(P,X),
  51. at_x(P2,X2),
  52. at_y(P1,Y),
  53. at_y(P,Y),
  54. at_y(P2,Y).
Add Comment
Please, Sign In to add comment