added log, fixed checkIfWon()
This commit is contained in:
parent
3ffe26f9ae
commit
f07bceb019
3 changed files with 8 additions and 9 deletions
|
@ -95,8 +95,8 @@ expose(Global, Table) ->
|
|||
{"serverInfo", fun(#erlv8_fun_invocation{}, []) ->
|
||||
PlayerList = ggs_coordinator:get_all_players(),
|
||||
integer_to_list(length(PlayerList))
|
||||
end}
|
||||
%{"log", fun(#erlv8_fun_invocation{}, [Arg]) -> erlang:display(Arg) end }
|
||||
end},
|
||||
{"log", fun(#erlv8_fun_invocation{}, [Arg]) -> erlang:display(Arg) end }
|
||||
%{"setTimeout", fund(#erlv8_fun_invocation{}, [Time, FunctionName])-> setTimeout(Time, FunctionName) end}
|
||||
])).
|
||||
|
||||
|
|
|
@ -102,7 +102,6 @@ handle_cast({srv_cmd, "hello", _Headers, TableToken}, State) ->
|
|||
{noreply, State#state{ table = TPid } }
|
||||
end;
|
||||
handle_cast({srv_cmd, "define", _Headers, Data}, #state { table = Table } = State) ->
|
||||
erl:display(Data),
|
||||
ggs_table:notify(Table, self(), {server, define, Data}),
|
||||
{noreply, State};
|
||||
handle_cast({game_cmd, Command, _Headers, Data}, #state { table = Table } = State) ->
|
||||
|
|
Reference in a new issue