Skip to content

Commit

Permalink
Nicer intro and output
Browse files Browse the repository at this point in the history
  • Loading branch information
linkyndy committed Mar 23, 2015
1 parent 4eda157 commit 871bf6c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions main.pl
@@ -1,12 +1,16 @@
% Expert system should be started from here
main :-
write('Which programming language should I learn first?'),
nl,
intro,
reset_answers,
find_language(Language),
describe(Language), nl.


intro :-
write('Which programming language should I learn first?'), nl,
write('To answer, input the number shown next to each answer, followed by a dot (.)'), nl, nl.


find_language(Language) :-
language(Language), !.

Expand All @@ -19,7 +23,6 @@
% reset_answers must always return true; because retract can return either true
% or false, we fail the first and succeed with the second.
reset_answers :-
write('Resetting progress...'),
retract(progress(_, _)),
fail.
reset_answers.
Expand Down

0 comments on commit 871bf6c

Please sign in to comment.