mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 21:05:52 +00:00
Removed unused class ai::stage_rca_formulas.
This commit is contained in:
parent
d473b4e7b1
commit
85c68b3b3a
@ -239,7 +239,6 @@ set(wesnoth-main_SRC
|
||||
ai/formula/callable_objects.cpp
|
||||
ai/formula/candidates.cpp
|
||||
ai/formula/function_table.cpp
|
||||
ai/formula/stage_rca_formulas.cpp
|
||||
ai/formula/stage_side_formulas.cpp
|
||||
ai/formula/stage_unit_formulas.cpp
|
||||
ai/game_info.cpp
|
||||
|
@ -65,7 +65,6 @@ wesnoth_source = \
|
||||
ai/formula/callable_objects.cpp \
|
||||
ai/formula/candidates.cpp \
|
||||
ai/formula/function_table.cpp \
|
||||
ai/formula/stage_rca_formulas.cpp \
|
||||
ai/formula/stage_side_formulas.cpp \
|
||||
ai/formula/stage_unit_formulas.cpp \
|
||||
ai/game_info.cpp \
|
||||
|
@ -170,7 +170,6 @@ wesnoth_sources = Split("""
|
||||
ai/formula/callable_objects.cpp
|
||||
ai/formula/candidates.cpp
|
||||
ai/formula/function_table.cpp
|
||||
ai/formula/stage_rca_formulas.cpp
|
||||
ai/formula/stage_side_formulas.cpp
|
||||
ai/formula/stage_unit_formulas.cpp
|
||||
ai/game_info.cpp
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include "ai.hpp"
|
||||
#include "engine_fai.hpp"
|
||||
#include "../formula/stage_rca_formulas.hpp"
|
||||
#include "../formula/stage_side_formulas.hpp"
|
||||
#include "../formula/stage_unit_formulas.hpp"
|
||||
#include "rca.hpp"
|
||||
|
@ -1,96 +0,0 @@
|
||||
/* $Id$ */
|
||||
/*
|
||||
Copyright (C) 2009 - 2010 by Yurii Chernyi <terraninfo@terraninfo.net>
|
||||
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2
|
||||
or at your option any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY.
|
||||
|
||||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file ai/formula/stage_rca_formulas.cpp
|
||||
* Defines formula ai rca formulas stage
|
||||
* */
|
||||
|
||||
|
||||
#include "stage_rca_formulas.hpp"
|
||||
#include "ai.hpp"
|
||||
|
||||
#include "../../formula.hpp"
|
||||
#include "../../formula_function.hpp"
|
||||
#include "../../log.hpp"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
static lg::log_domain log_ai("ai/stage/rca_formulas");
|
||||
#define LOG_AI LOG_STREAM(info, log_ai)
|
||||
#define WRN_AI LOG_STREAM(warn, log_ai)
|
||||
#define ERR_AI LOG_STREAM(err, log_ai)
|
||||
|
||||
namespace ai {
|
||||
|
||||
//note: will not be documented for 1.8, as it's not finished
|
||||
stage_rca_formulas::stage_rca_formulas(ai_context &context
|
||||
, const config &cfg, formula_ai &fai)
|
||||
: stage(context,cfg)
|
||||
, cfg_(cfg)
|
||||
, fai_(fai)
|
||||
, candidate_action_manager_()
|
||||
{
|
||||
/* try {
|
||||
if( candidate_action_manager_.has_candidate_actions() ) {
|
||||
|
||||
while( candidate_action_manager_.evaluate_candidate_actions(&fai_, get_info().units) )
|
||||
{
|
||||
game_logic::map_formula_callable callable(&fai_);
|
||||
callable.add_ref();
|
||||
|
||||
candidate_action_manager_.update_callable_map( callable );
|
||||
|
||||
game_logic::const_formula_ptr move_formula(candidate_action_manager_.get_best_action_formula());
|
||||
|
||||
fai_.make_action(move_formula, callable);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(game_logic::formula_error& e) {
|
||||
if(e.filename == "formula") {
|
||||
e.line = 0;
|
||||
}
|
||||
fai_.handle_exception( e, "Formula error in RCA loop");
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
stage_rca_formulas::~stage_rca_formulas()
|
||||
{
|
||||
}
|
||||
|
||||
bool stage_rca_formulas::do_play_stage()
|
||||
{
|
||||
return false;//@todo 1.9: implement
|
||||
}
|
||||
|
||||
|
||||
void stage_rca_formulas::on_create()
|
||||
{
|
||||
//@todo 1.9 parse the formulas
|
||||
//candidate_action_manager_.load_config(ai_param, this, &function_table);
|
||||
}
|
||||
|
||||
|
||||
config stage_rca_formulas::to_config() const
|
||||
{
|
||||
config cfg = stage::to_config();
|
||||
//@todo 1.9: serialize to config
|
||||
cfg.append(cfg_);
|
||||
return cfg;
|
||||
}
|
||||
|
||||
} // end of namespace ai
|
@ -1,63 +0,0 @@
|
||||
/* $Id$ */
|
||||
/*
|
||||
Copyright (C) 2009 - 2010 by Yurii Chernyi <terraninfo@terraninfo.net>
|
||||
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2
|
||||
or at your option any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY.
|
||||
|
||||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file ai/formula/stage_rca_formulas.hpp
|
||||
* Stage which executes rca formulas
|
||||
* */
|
||||
|
||||
|
||||
#ifndef AI_FORMULA_STAGE_RCA_FORMULAS_HPP_INCLUDED
|
||||
#define AI_FORMULA_STAGE_RCA_FORMULAS_HPP_INCLUDED
|
||||
|
||||
#include "../composite/stage.hpp"
|
||||
#include "candidates.hpp"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
//silence "inherits via dominance" warnings
|
||||
#pragma warning(disable:4250)
|
||||
#endif
|
||||
|
||||
|
||||
namespace ai {
|
||||
|
||||
class formula_ai;
|
||||
|
||||
class stage_rca_formulas: public stage {
|
||||
public:
|
||||
stage_rca_formulas( ai_context &context, const config &cfg, formula_ai &fai );
|
||||
|
||||
virtual ~stage_rca_formulas();
|
||||
|
||||
bool do_play_stage();
|
||||
|
||||
void on_create();
|
||||
|
||||
config to_config() const;
|
||||
|
||||
private:
|
||||
const config &cfg_;
|
||||
formula_ai &fai_;
|
||||
game_logic::candidate_action_manager candidate_action_manager_;
|
||||
|
||||
};
|
||||
|
||||
} //end of namespace ai
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user