Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. isBlack(X):-X=x.
  2.  
  3. wx([[L1,_],[_,L4]|_]):- isBlack(L1),isBlack(L4).
  4. wx([[_,L2],[L3,_]|_]):- isBlack(L3),isBlack(L2).
  5.  
  6. wx([[L1,P1|T],[_,L4|T1]|Tl]):- isBlack(L1),isBlack(L4),wx([[P1|T],[L4|T1]|Tl]).
  7. wx([[_,L2|T],[L3,P1|T1]|Tl]):- isBlack(L3),isBlack(L2),wx([[L2|T],[P1|T1]|Tl]).
  8.  
  9. wx([[_,_|_],[L,L1|T1]|T]):- wx([[L,L1|T1]|T]).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement