:- 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).