SZI2019SmieciarzWmi/prolog/basic_rules.pl

23 lines
554 B
Perl
Raw Normal View History

:- [house_positions].
check_position(X, Y):-
collectable_object(Z,X,Y),
write(Z),nl.
full(Collectable_object, Material) :-
contains(Collectable_object, Material,10).
contains(Collectable_object, Material):-
contains(Collectable_object,Material,Y),
Y>0.
contains(Collectable_object) :-
contains(Collectable_object, paper);
contains(Collectable_object, glass);
contains(Collectable_object, metal).
full(Collectable_object) :-
full(Collectable_object, paper),
full(Collectable_object, metal),
full(Collectable_object, glass).