Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onstreet(X,s(X,_,_,_,_)).
- onstreet(X,s(_,X,_,_,_)).
- onstreet(X,s(_,_,X,_,_)).
- onstreet(X,s(_,_,_,X,_)).
- onstreet(X,s(_,_,_,_,X)).
- firstleft(X,s(X,_,_,_,_)).
- middlehouse(X,s(_,_,X,_,_)).
- onleft(X,Y,s(X,Y,_,_,_)).
- onleft(X,Y,s(_,X,Y,_,_)).
- onleft(X,Y,s(_,_,X,Y,_)).
- onleft(X,Y,s(_,_,_,X,Y)).
- onright(X,Y,s(Y,X,_,_,_)).
- onright(X,Y,s(_,Y,X,_,_)).
- onright(X,Y,s(_,_,Y,X,_)).
- onright(X,Y,s(_,_,_,Y,X)).
- nextto(X,Y,S):-onleft(X,Y,S);onright(X,Y,S).
- clue1(S):-onstreet(house(red,englishman,_,_,_),S).
- clue2(S):-onstreet(house(_,spaniard,_,dog,_),S).
- clue3(S):-onstreet(house(green,_,coffee,_,_),S).
- clue4(S):-onstreet(house(_,ukrainian,tea,_,_),S).
- clue5(S):-onright(house(green,_,_,_,_),house(ivory,_,_,_,_),S).
- clue6(S):-onstreet(house(_,_,_,snails,tennis),S).
- clue7(S):-onstreet(house(yellow,_,_,_,chess),S).
- clue8(S):-middlehouse(house(_,_,milk,_,_),S).
- clue9(S):-firstleft(house(_,norwegian,_,_,_),S).
- clue10(S):-nextto(house(_,_,_,_,rugby),house(_,_,_,fox,_),S).
- clue11(S):-nextto(house(_,_,_,_,chess),house(_,_,_,horse,_),S).
- clue12(S):-onstreet(house(_,_,orangejuice,volleyball),S).
- clue13(S):-onstreet(house(_,japanese,_,go),S).
- clue14(S):-nextto(house(_,norwegian,_,_,_),house(blue,_,_,_,_),S).
- clue15(S):-nextto(house(_,_,tea,_,_),house(_,_,milo,_,_),S).
- clue(S):-clue1(S),clue2(S),clue3(S),clue4(S),clue5(S),clue6(S),clue7(S),clue8(S),clue9(S),clue10(S),clue11(S),clue12(S),clue13(S),clue14(S),clue15(S).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement