summaryrefslogtreecommitdiff
path: root/src/main.prolog
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.prolog')
-rw-r--r--src/main.prolog34
1 files changed, 34 insertions, 0 deletions
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).
+