From 19e66dbd8fd3bd66f286bbbcd7ce842d727a4422 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Fri, 4 Apr 2014 01:48:43 +1100 Subject: Makefile added, files reorganised --- src/main.prolog | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/main.prolog (limited to 'src/main.prolog') diff --git a/src/main.prolog b/src/main.prolog new file mode 100644 index 0000000..ef23f4f --- /dev/null +++ b/src/main.prolog @@ -0,0 +1,34 @@ + + +:- consult('parser.prolog'). +:- consult('agent.prolog'). +:- consult('command.prolog'). + + + + +play :- + init, + look, + playLoop. + + +playLoop :- + prompt(Line), + evalLine(Line). + + +evalLine(Line) :- + getCommand(Line,Command), + Command, + playLoop. + + +evalLine(_) :- + write('What?\n\n'), + playLoop. + + +quit :- + halt(0). + -- cgit