Properly initialized command-line ai config.

formula_ai console should be now fully operational.
This commit is contained in:
Iurii Chernyi 2009-08-08 12:02:35 +00:00
parent aede21604c
commit 5e0e72324e
2 changed files with 9 additions and 9 deletions

View file

@ -65,6 +65,13 @@ public:
static void init(const config &game_config);
/**
* get default AI parameters
* @return default AI parameters
*/
static const config& get_default_ai_parameters();
/**
* Return the config for a specified ai
*/
@ -135,13 +142,6 @@ private:
*/
static bool upgrade_side_config_from_1_07_02_to_1_07_03(config &cfg);
/**
* get default AI parameters
* @return default AI parameters
*/
static const config& get_default_ai_parameters();
typedef std::map<std::string, description> description_map;
static description_map ai_configurations_;
static config default_config_;

View file

@ -737,8 +737,8 @@ holder& manager::get_or_create_active_ai_holder_for_side_without_fallback(side_n
if (!ai_stack_for_specific_side.empty()){
return ai_stack_for_specific_side.top();
} else {
config cfg;
cfg["ai_algorithm"] = ai_algorithm_type;
config cfg = configuration::get_default_ai_parameters();
cfg["ai_algorithm"] = ai_algorithm_type;//@todo: replace with fallback stage
holder new_holder(side, cfg);
ai_stack_for_specific_side.push(new_holder);
return ai_stack_for_specific_side.top();