anchor.diff:  %% Gen_fsm callbacks 
   %%====================================================================
   
  +-spec init(Args :: term()) -> Result when
  +	Result :: {ok, StateName, StateData}
  +			| {ok, StateName, StateData, Timeout}
  +			| {ok, StateName, StateData, hibernate}
  +			| {stop, Reason}
  +			| ignore,
  +	StateName :: atom(),
  +	StateData :: term(),
  +	Timeout :: non_neg_integer() | infinity,
  +	Reason :: term().
   init([GameId, Privacy, MaxPlayers, GameEventPid, BcGameSup]) ->
   	BcGame = bc_game:init(GameId, Privacy, MaxPlayers, GameEventPid, self()),
   	{ok, pending, #state{game = BcGame,
  
positive.code: %% number of players to start game
  -define(TIMEOUT, 30000).
  
  %% exported funcs
  -export([start_link/5, 
  		 player_join/3, 
  		 player_quit/2, 
  		 player_out/2]).
  
  -export([init/1, 
  		 pending/2, 
  		 pending/3, 
  		 started/2, 
  		 terminate/3, 
  		 handle_info/3]).
  
  %% state rec
  -record(state, {game,
  
negative.code: 			end;
  		{error, Reason} = Error ->
  			{stop, Error, State}
  	end;
  started(Event, State) ->
  	{next_state, started, State}.
  
  -spec handle_event(Event :: term(), StateName :: atom(), StateData :: term()) -> Result when
  	Result :: {next_state, NextStateName, NewStateData}
  			| {next_state, NextStateName, NewStateData, Timeout}
  			| {next_state, NextStateName, NewStateData, hibernate}
  			| {stop, Reason, NewStateData},
  	NextStateName :: atom(),
  	NewStateData :: term(),
  	Timeout :: non_neg_integer() | infinity,
  	Reason :: term().
  handle_event(Event, StateName, State) ->
  	{next_state, StateName, State}.
  
  -spec handle_sync_event(Event :: term(), From :: {pid(), Tag :: term()}, StateName :: atom(), StateData :: term()) -> Result when
  	Result :: {reply, Reply, NextStateName, NewStateData}
  			| {reply, Reply, NextStateName, NewStateData, Timeout}
  			| {reply, Reply, NextStateName, NewStateData, hibernate}
  			| {next_state, NextStateName, NewStateData}
  			| {next_state, NextStateName, NewStateData, Timeout}
  			| {next_state, NextStateName, NewStateData, hibernate}
  			| {stop, Reason, Reply, NewStateData}
  			| {stop, Reason, NewStateData},
  	Reply :: term(),
  	NextStateName :: atom(),
  	NewStateData :: term(),
  	Timeout :: non_neg_integer() | infinity,
  	Reason :: term().
  handle_sync_event(Event, From, StateName, StateData) ->
  	{reply, ok, StateName, StateData}.
  
  -spec handle_info(Info :: term(), StateName :: atom(), StateData :: term()) -> Result when
  	Result :: {next_state, NextStateName, NewStateData}
  			| {next_state, NextStateName, NewStateData, Timeout}
  			| {next_state, NextStateName, NewStateData, hibernate}
  			| {stop, Reason, NewStateData},
  	NextStateName :: atom(),
  	NewStateData :: term(),
  	Timeout :: non_neg_integer() | infinity,
  	Reason :: normal | term().
  handle_info({'DOWN', Ref, process, Pid, _}, StateName,
  		#state{game = BcGame,
  			   players = Players} = State) ->
  