diff options
-rw-r--r-- | agent.prolog | 14 | ||||
-rw-r--r-- | main.prolog | 11 |
2 files changed, 25 insertions, 0 deletions
diff --git a/agent.prolog b/agent.prolog new file mode 100644 index 0000000..338b3f2 --- /dev/null +++ b/agent.prolog @@ -0,0 +1,14 @@ + +:- module(agent, [look/0, move/1]). + + +look :- + write('looking\n'). + + +move(D) :- + here(L), + connects(L,N,D), + retract(here(L)), + asserta(here(N)), !. + diff --git a/main.prolog b/main.prolog new file mode 100644 index 0000000..5204ef7 --- /dev/null +++ b/main.prolog @@ -0,0 +1,11 @@ + + +:- consult('map.prolog'). +:- consult('agent.prolog'). +:- consult('read.prolog'). + + +init :- + retractall(here(X)), + asserta(here(a)), !. + |