23 lines
554 B
Perl
23 lines
554 B
Perl
|
:- [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).
|