Add help menu (no examples added yet)
It features tons of musical references I'm sad that I didn't add any song of the king
This commit is contained in:
parent
b14aeb8893
commit
2a6f7920bf
62
polymani.pl
62
polymani.pl
@ -90,6 +90,61 @@ process_input(command(CL, TCR)) :-
|
||||
%% recurse
|
||||
process_input(TCR).
|
||||
|
||||
do_process_input(help_menu) :-
|
||||
writeln("Please allow me to introduce myself"),
|
||||
writeln("I'm a man[ual] of wealth and taste"),
|
||||
writeln("I've been around for a long, long semester"),
|
||||
writeln("Saved many a man's soul and faith"),
|
||||
writeln("Pleased to meet you"),
|
||||
writeln("Hope you guess my name"),
|
||||
writeln("But what's puzzling you"),
|
||||
writeln("Is the nature of my game"),
|
||||
nl,
|
||||
writeln("I'm a Polynomial Manipulator and the following commands are available:"),
|
||||
writeln("=> Show - Allows to print a polynomial mathematically"),
|
||||
writeln("=> Multiply - Allows to make multiplications"),
|
||||
writeln("=> Simplify - Allows to simplify a given polynomial"),
|
||||
writeln("=> Add - Allows to make sums"),
|
||||
writeln("=> bye - Hello darkness, my old friend"),
|
||||
writeln("Use 'tell me about {command}' to learn more about a specific command"),
|
||||
nl,
|
||||
writeln("Furthermore, I'm capable of memorizing polynomials during runtime. To learn more on that, type: tell me about storage").
|
||||
do_process_input(help(show)) :-
|
||||
writeln("It's almost an echo of what you said, but a mathy one."),
|
||||
writeln("Some example queries:"),
|
||||
writeln(">").
|
||||
do_process_input(help(multiply)) :-
|
||||
writeln("Multiplies a polynomial represented as an expression by a scalar resulting in a second polynomial. The two first arguments are assumed to be ground. The polynomial resulting from the sum is in simplified form."),
|
||||
writeln("Some example queries:"),
|
||||
writeln(">").
|
||||
do_process_input(help(simplify)) :-
|
||||
writeln("Simplifies a polynomial represented as an expression as another polynomial as an expression."),
|
||||
writeln("Some example queries:"),
|
||||
writeln(">").
|
||||
do_process_input(help(add)) :-
|
||||
writeln("Adds two polynomials as expressions resulting in a third one. The two first arguments are assumed to be ground. The polynomial resulting from the sum is in simplified form."),
|
||||
writeln("Some example queries:"),
|
||||
writeln(">").
|
||||
do_process_input(help(storage)) :-
|
||||
writeln("Memories"),
|
||||
writeln("All I have is memories"),
|
||||
writeln("All I have is memories"),
|
||||
writeln("Memories of polynomials"),
|
||||
nl,
|
||||
writeln("Storage manipulation is better illustrated with examples. Some example queries:"),
|
||||
writeln("Asking me to memorize something:"),
|
||||
writeln(">"),
|
||||
nl,
|
||||
writeln("Asking me to forget something:"),
|
||||
writeln(">"),
|
||||
nl,
|
||||
writeln("Some examples of memory resources usage:"),
|
||||
writeln(">").
|
||||
do_process_input(help(bye)) :-
|
||||
writeln("There must be some kind of way outta here"),
|
||||
writeln("Said the joker to the thief"),
|
||||
writeln("There's too much confusion"),
|
||||
writeln("I can't get no relief").
|
||||
do_process_input(show_stored_polynomials) :-
|
||||
findall(nm(X,Y), polynomial_store(X,Y), D),
|
||||
nlp_print_memory(D).
|
||||
@ -415,6 +470,13 @@ parse_polynomial_explicit(void-_, T) -->
|
||||
!,
|
||||
{ T \= void }.
|
||||
|
||||
parse_command(help_menu) -->
|
||||
[help].
|
||||
parse_command(help(C)) -->
|
||||
[tell],
|
||||
[me],
|
||||
[about],
|
||||
[C].
|
||||
parse_command(show_stored_polynomials) -->
|
||||
[show, stored, polynomials].
|
||||
parse_command(forget(P)) -->
|
||||
|
Reference in New Issue
Block a user