diff options
Diffstat (limited to 'pd_client.pl')
-rw-r--r-- | pd_client.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pd_client.pl b/pd_client.pl index 7b32e3a..5e6c5b0 100644 --- a/pd_client.pl +++ b/pd_client.pl @@ -17,13 +17,14 @@ do(_, _, _, _, [e|_]) :- !. do(StreamIn, StreamOut, Module, ModuleState, Hist) :- call(Module, Hist, ModuleDecision, ModuleState, NewModuleState), write(StreamOut, ModuleDecision), flush_output(StreamOut), + format('Own choose:\t~w\n', [ModuleDecision]), loop(StreamIn, StreamOut, Module, NewModuleState, Hist). loop(StreamIn, StreamOut, Module, ModuleState, Hist) :- get_code(StreamIn, ChoiceCode), byte_to_atom(ChoiceCode, Choice), - write(Choice), + format('Opponent chose:\t~w\n', [Choice]), do(StreamIn, StreamOut, Module, ModuleState, [Choice|Hist]). % -1 = EOF byte_to_atom(-1, e):-!. -byte_to_atom(Byte, Atom):-name(Atom, [Byte]). +byte_to_atom(Byte, Atom):-atom_codes(Atom, [Byte]). |