예제 #1
0
파일: ai.cpp 프로젝트: ArtBears/wesnoth
void ai_composite::new_turn()
{
	///@todo 1.9 replace with event system
	recalculate_move_maps();
	invalidate_defensive_position_cache();
	invalidate_keeps_cache();
	clear_additional_targets();
	unit_stats_cache().clear();
}
예제 #2
0
void strategy_formulation_with_rca::init_side()
{
	recalculate_move_maps();
	invalidate_defensive_position_cache();
	invalidate_keeps_cache();
	clear_additional_targets();
	unit_stats_cache().clear();

	DBG_AI_TESTING_SF_WITH_RCA << "------init_side() begin------" << std::endl;
	unit_map& units = *resources::units;
	for(unit_map::unit_iterator ui = units.begin(); ui != units.end(); ++ui){
		if(ui->side() == this->get_side()){
			ui->new_turn();
		}
	}
	(*resources::teams)[this->get_side()-1].new_turn();
	calculate_healing(this->get_side(), false);

	DBG_AI_TESTING_SF_WITH_RCA << "------init_side() end------" << std::endl;
}