summaryrefslogtreecommitdiff
path: root/item.prolog
diff options
context:
space:
mode:
Diffstat (limited to 'item.prolog')
-rw-r--r--item.prolog22
1 files changed, 22 insertions, 0 deletions
diff --git a/item.prolog b/item.prolog
new file mode 100644
index 0000000..11e469c
--- /dev/null
+++ b/item.prolog
@@ -0,0 +1,22 @@
+
+:- 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').
+