summaryrefslogtreecommitdiff
path: root/item.prolog
blob: 11e469c45522d44b857f5ad3ad9277936ba4f37b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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').