From 410fc38f935b552a58af2e716d2fe814eee432c9 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Fri, 21 Mar 2014 03:01:42 +1100 Subject: Basic items and look command --- map.prolog | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'map.prolog') diff --git a/map.prolog b/map.prolog index aee7a56..5c432d9 100644 --- a/map.prolog +++ b/map.prolog @@ -1,4 +1,14 @@ +:- module(map, [connects/3, writeExits/1]). + + +writeExits(L) :- + connects(L,_,D), + join(['You see an exit to the ',D,'.\n'],M), + write(M), + fail. +writeExits(_) :- true. + % map has 20 rooms, labelled a through t % connections between rooms inscribe a dodecahedron, with the rooms -- cgit