anchor.diff:  			{ok, Num, State}
   	end.
   
  -spawn_vertices(#state{base_num = BaseNum,
  -					  spawn_vertices = SpawnBcVertices,
  -					  map = BcMap} = State) ->
  -	case SpawnBcVertices of
  +%% do_spawn_entities(BcEntityConfig, SpawnBcVertices, BatchCount, 
  +%% 				  #state{entities = BcEntities,
  +%% 						 map = BcMap,
  +%% 						 base_num = BaseNum,
  +%% 						 spawn_matrix = BcMatrix} = State) ->
  +%% 	SpawnBcVertices = spawn_vertices(Offset, State),
  +%% 	EntitySize = bc_entity_config:size(BcEntityConfig),
  +%% 	BatchSize = length(SpawnBcVertices) / EntitySize,
  +%% 	
  +%% 
  +%% spawn_entities(BcEntityConfig, #state{entities = BcEntities,
  +%% 								  	  map = BcMap,
  +%% 									  base_num = BaseNum,
  +%% 								  	  spawn_matrix = BcMatrix} = State) ->
  +%% 	
  +%% 	%% TODO spawn entities
  +%% 	ok.
  +
  +spawn_vertices(Offset, #state{base_num = BaseNum,
  +					  		  spawn_matrix = SpawnBcMatrix} = State) ->
  +	case BaseNum of
  +		1 -> 
  +			MinRow = bc_matrix:min_row(SpawnBcMatrix),
  +			bc_matrix:row(MinRow + Offset, SpawnBcMatrix);
  +		2 ->
  +			MaxCol = bc_matrix:max_col(SpawnBcMatrix),
  +			bc_matrix:col(MaxCol - Offset, SpawnBcMatrix);
  +		3 ->
  +			MaxRow = bc_matrix:max_row(SpawnBcMatrix),
  +			bc_matrix:row(MaxRow - Offset, SpawnBcMatrix);
  +		4 ->
  +			MinCol = bc_matrix:min_col(SpawnBcMatrix),
  +			bc_matrix:col(MinCol + Offset, SpawnBcMatrix)
  +	end.
  +
  +spawn_matrix(#state{base_num = BaseNum,
  +					spawn_matrix = SpawnBcMatrix,
  +					map = BcMap} = State) ->
  +	case SpawnBcMatrix of
   		undefined ->
   			BcVertices = case BaseNum of
   							 1 -> bc_map:base1_spawn_vertices(BcMap);
  
positive.code: 							 3 -> bc_map:base3_spawn_vertices(BcMap);
  							 4 -> bc_map:base4_spawn_vertices(BcMap)
  						 end,
  			{ok, BcVertices, State#state{spawn_vertices = BcVertices}};
  		BcVertices when is_list(BcVertices) 
  		  			andalso length(BcVertices) > 0 ->
  			{ok, SpawnBcVertices, State}
  	end.
  
negative.code: 				game,
  				player,
  				base_num,
  				spawn_matrix,
  				gold,
  				map,
  				entities}).
  