37 virtual const std::vector<team> &
teams()
const = 0;
Abstract class for exposing game data that doesn't depend on the GUI, however which for historical re...
const team & get_team(int side) const
This getter takes a 1-based side number, not a 0-based team number.
orb_status unit_orb_status(const unit &u) const
Returns an enumurated summary of whether this unit can move and/or attack.
int village_owner(const map_location &loc) const
Given the location of a village, will return the 1-based number of the team that currently owns it,...
const unit * get_visible_unit(const map_location &loc, const team ¤t_team, bool see_all=false) const
bool is_observer() const
Check if we are an observer in this game.
can_move_result unit_can_move(const unit &u) const
Work out what u can do - this does not check which player's turn is currently active,...
virtual const gamemap & map() const =0
bool has_team(int side) const
virtual const std::vector< std::string > & hidden_label_categories() const =0
int side_units(int side_num) const
Returns the number of units of the side side_num.
virtual ~display_context()
virtual std::vector< std::string > & hidden_label_categories()=0
virtual const std::vector< team > & teams() const =0
unit_const_ptr get_visible_unit_shared_ptr(const map_location &loc, const team ¤t_team, bool see_all=false) const
int side_units_cost(int side_num) const
Returns the total cost of units of side side_num.
virtual const unit_map & units() const =0
bool would_be_discovered(const map_location &loc, int side_num, bool see_all=true)
Given a location and a side number, indicates whether an invisible unit of that side at that location...
int side_upkeep(int side_num) const
Encapsulates the map of the game.
This class stores all the data for a single 'side' (in game nomenclature).
Container associating units to locations.
This class represents a single unit of a specific type.
orb_status
Corresponds to the colored orbs displayed above units' hp-bar and xp-bar.
std::shared_ptr< const unit > unit_const_ptr
bool attack_here
The unit can make an attack from the hex that it's currently on, this requires attack points and a no...
bool move
The unit can move to another hex, taking account of enemies' locations, ZoC and terrain costs vs curr...
Encapsulates the map of the game.
team_data(const display_context &dc, const team &tm)