removed io

This commit is contained in:
Jeena Paradies 2011-02-22 13:56:27 +01:00
parent 0c76c85d8f
commit dcc1a6086f
2 changed files with 5 additions and 9 deletions

View file

@ -51,9 +51,6 @@ notify_all_players(Table, Message) ->
gen_server:cast(Table, {notify_all_players, Message}).
notify_game(Table, From, Message) ->
io:format("Notify game called on"),
erlang:display(Table),
io:format("~n"),
gen_server:cast(Table, {notify_game, Message, From}).
%% ----------------------------------------------------------------------
@ -95,11 +92,10 @@ handle_cast({notify_game, Message, From}, #state { game_vm = GameVM } = State) -
{noreply, State};
handle_cast({notify_all_players, Message}, #state{players = Players} = State) ->
io:format("Notifying all players... ~p~n", [Players]),
lists:foreach(fun(P) ->
io:format("Notifying ~p~n", [P]),
ggs_player:notify(P, "Server", Message)
end, Players),
lists:foreach(
fun(P) -> ggs_player:notify(P, "Server", Message) end,
Players
),
{noreply, State};
handle_cast(stop, State) ->

View file

@ -31,7 +31,7 @@ stop_test() ->
notify_test() ->
Table = ggs_table:start_link(),
Player = test_player,
Message = {server, define, "function helloWorld(x) { }"},
Message = {server, define, "function helloWorld(x) { }"},
ok = ggs_table:notify(Table, Player, Message),
Message2 = {game, "helloWorld", "test"},
ok = ggs_table:notify(Table, Player, Message2).