Added pong_bot:start(N) to start N games.

This commit is contained in:
Kallfaktorn 2011-04-20 16:10:59 +02:00
parent 762698945d
commit 2059bc7282

View file

@ -1,10 +1,16 @@
-module(pong_bot). -module(pong_bot).
-behaviour(gen_server). -behaviour(gen_server).
-export([start_link/0]). -export([start/1, start_link/0]).
-export([init/1, handle_call/3, handle_cast/2]). -export([init/1, handle_call/3, handle_cast/2]).
-export([ggsNetworkReceivedCommandWithArgs/3,set_game_token/2,get_game_token/1]). -export([ggsNetworkReceivedCommandWithArgs/3,set_game_token/2,get_game_token/1]).
-export([view/1, peek_socket/1]). -export([view/1, peek_socket/1]).
start(0) ->
ok;
start(N) ->
start_link(),
timer:sleep(50),
start(N - 1).
start_link() -> start_link() ->
Ref = make_ref(), Ref = make_ref(),