The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
simulated_actions.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2016 by Guorui Xi <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 /**
16  * Implement simulated actions
17  * @file
18  */
19 
20 #ifndef AI_SIMULATED_ACTIONS_HPP_INCLUDED
21 #define AI_SIMULATED_ACTIONS_HPP_INCLUDED
22 
23 #include "ai/game_info.hpp"
24 
26 
27 class unit_type;
28 
29 namespace ai{
30 
31 bool simulated_attack(const map_location& attacker_loc, const map_location& defender_loc, double attacker_hp, double defender_hp);
32 
33 bool simulated_move(int side, const map_location& from, const map_location& to, int steps, map_location& unit_location);
34 
35 bool simulated_recall(int side, const std::string& unit_id, const map_location& recall_location);
36 
37 bool simulated_recruit(int side, const unit_type* u, const map_location& recruit_location);
38 
39 bool simulated_stopunit(const map_location& unit_location, bool remove_movement, bool remove_attacks);
40 
42 
43 }
44 
45 #endif
bool simulated_synced_command()
bool simulated_attack(const map_location &attacker_loc, const map_location &defender_loc, double attacker_hp, double defender_hp)
A small explanation about what's going on here: Each action has access to two game_info objects First...
Definition: actions.cpp:57
bool simulated_recall(int side, const std::string &unit_id, const map_location &recall_location)
Encapsulates the map of the game.
Definition: location.hpp:38
Game information for the AI.
bool simulated_stopunit(const map_location &unit_location, bool remove_movement, bool remove_attacks)
bool simulated_move(int side, const map_location &from, const map_location &to, int steps, map_location &unit_location)
bool simulated_recruit(int side, const unit_type *u, const map_location &recruit_location)
GLsizei const GLcharARB ** string
Definition: glew.h:4503