ai_interface::info Struct Reference

info is structure which holds references to all the important objects that an AI might need access to, in order to make and implement its decisions. More...

#include <ai_interface.hpp>

Collaboration diagram for ai_interface::info:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 info (game_display &disp, const gamemap &map, unit_map &units, std::vector< team > &teams, unsigned int team_num, const gamestatus &state, class turn_info &turn_data, class game_state &game_state)

Public Attributes

game_displaydisp
 The display object, used to draw the moves the AI makes.
const gamemapmap
 The map of the game -- use this object to find the terrain at any location.
unit_mapunits
 The map of units. It maps locations -> units.
std::vector< team > & teams
 A list of the teams in the game.
unsigned int team_num
 The number of the team the AI is.
const gamestatusstate
 Information about what turn it is, and what time of day.
class turn_infoturn_data_
 The object that allows the player to interact with the game.
class game_stategame_state_
 The global game state, because we may set the completion field.


Detailed Description

info is structure which holds references to all the important objects that an AI might need access to, in order to make and implement its decisions.

Definition at line 40 of file ai_interface.hpp.


Constructor & Destructor Documentation

ai_interface::info::info ( game_display disp,
const gamemap map,
unit_map units,
std::vector< team > &  teams,
unsigned int  team_num,
const gamestatus state,
class turn_info turn_data,
class game_state game_state 
) [inline]

Definition at line 41 of file ai_interface.hpp.


Member Data Documentation

The display object, used to draw the moves the AI makes.

Definition at line 47 of file ai_interface.hpp.

Referenced by ai_interface::attack_enemy(), ai_interface::diagnostic(), ai_interface::log_message(), and ai_interface::move_unit_partial().

The number of the team the AI is.

Note: this number is 1-based, so 1 must be subtracted for using it as index of 'teams'.

Definition at line 61 of file ai_interface.hpp.

Referenced by ai_interface::current_team(), ai_interface::get_value(), ai_interface::move_unit_partial(), formula_ai::play_turn(), dfool::dfool_ai::play_turn(), and ai_interface::recruit().

Information about what turn it is, and what time of day.

Definition at line 64 of file ai_interface.hpp.

Referenced by ai_interface::attack_enemy(), ai_interface::get_value(), and ai_interface::recruit().

The object that allows the player to interact with the game.

Should not be used outside of ai_interface.

Definition at line 68 of file ai_interface.hpp.

The global game state, because we may set the completion field.

Definition at line 71 of file ai_interface.hpp.


The documentation for this struct was generated from the following file:

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs