Download:
child 45:0bbe9c057774
parent 43:a8365c989b1c
44:8d400faca258
Anton Shestakov <engored@ya.ru>, Thu, 06 Mar 2014 19:39:46 +0900
Use ~p instead of ~w for win stats, overall more human-friendly format in printer.

1 файлов изменено, 3 вставок(+), 1 удалений(-) [+]
src/rps.erl file | annotate | diff | comparison | revisions
--- a/src/rps.erl Thu Mar 06 19:38:46 2014 +0900
+++ b/src/rps.erl Thu Mar 06 19:39:46 2014 +0900
@@ -54,7 +54,9 @@
printer() ->
receive
{stats, Stats} ->
- io:format("Stats: ~w.~n", [Stats])
+ {plays, Plays, draws, Draws, wins, Wins, hands, Hands} = Stats,
+ io:format("Plays: ~w, draws: ~w, wins: ~p, hands: ~w.~n",
+ [Plays, Draws, Wins, Hands])
after 1000 ->
counter ! {sendstats, self()}
end,