:- module(item, [itemAt/2, writeItemsAt/1, canTake/1, description/2]). itemAt(ladder,a). writeItemsAt(L) :- itemAt(X,L), description(X,D), write(D), fail. writeItemsAt(_) :- true. canTake(gold). canTake(deadWumpus). description(ladder, 'There is a rope ladder hanging from the ceiling here.\n'). description(gold, 'You see a glitter along the sandy floor of the cave.\n').