diff options
Diffstat (limited to 'tictactoe-2/apps/ttt_server/src/ttt_server.erl')
-rw-r--r-- | tictactoe-2/apps/ttt_server/src/ttt_server.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tictactoe-2/apps/ttt_server/src/ttt_server.erl b/tictactoe-2/apps/ttt_server/src/ttt_server.erl index c7167fb..a0de947 100644 --- a/tictactoe-2/apps/ttt_server/src/ttt_server.erl +++ b/tictactoe-2/apps/ttt_server/src/ttt_server.erl @@ -52,8 +52,15 @@ loop(State) -> io:format("Exiting~n", []); {stop, Pid} -> Pid ! ok; - recompiled -> - io:format("Reloading~n", []), + code_changed -> + io:format("Code changed~n"), + io:format("Code changed: ~p~n", [State#ttt_state.games]), + orddict:map( + fun(_Id, [G]) -> + io:format("Id=~p, v=~p~n", [_Id, G]), + G#ttt_game.pid ! code_changed + end, + State#ttt_state.games), ?MODULE:loop(State); X -> io:format("unexpected message: ~p~n", [X]), |