46 const unit* pass_check=
nullptr,
47 const team* shroud_check=
nullptr,
54 const team& viewing_team,
bool see_all=
false);
80 bool force_ignore_zocs,
bool allow_teleport,
81 const team &viewing_team,
int additional_turns = 0,
82 bool see_all =
false,
bool ignore_units =
false);
98 std::vector<map_location> get_path(
const const_iterator &)
const;
109 const std::map<map_location, int>& jamming_map);
112 const std::map<map_location, int>& jamming_map);
145 , move_cost(route.move_cost)
153 , move_cost(route.move_cost)
160 this->route = rhs.
route;
161 this->steps = this->route.
steps;
162 this->move_cost = this->route.move_cost;
163 this->marks = rhs.
marks;
169 mark(
int turns_number = 0,
bool in_zoc =
false,
170 bool do_capture =
false,
bool is_invisible =
false)
171 :
turns(turns_number), zoc(in_zoc),
172 capture(do_capture), invisible(is_invisible) {}
194 const std::size_t parWidth,
const std::size_t parHeight,
195 const teleport_map* teleports =
nullptr,
bool border =
false);
206 const std::vector<team> &teams,
const gamemap &map,
207 bool ignore_unit =
false,
bool ignore_defense_ =
false,
208 bool see_all =
false);
270 bool allow_teleport,
const team &viewing_team,
271 bool see_all=
true,
bool ignore_units=
true);
276 bool allow_teleport,
const team &viewing_team,
277 bool see_all=
true,
bool ignore_units=
true);
279 void add_unit(
const unit& u,
bool use_max_moves=
true);
282 std::pair<int, int> get_pair_at(
map_location loc)
const;
bool enemy_zoc(const team ¤t_team, const map_location &loc, const team &viewing_team, bool see_all)
Determines if a given location is in an enemy zone of control.
A const-only interface for how many (movement, vision, or "jamming") points a unit needs for each hex...
marked_route & operator=(const marked_route &rhs)
marked_route mark_route(const plain_route &rt, bool update_move_cost)
Add marks on a route rt assuming that the unit located at the first hex of rt travels along it...
Function which doesn't take anything into account.
std::vector< std::pair< int, int > > cost_map
This class represents a single unit of a specific type.
map_location find_vacant_castle(const unit &leader)
Wrapper for find_vacant_tile() when looking for a vacant castle tile near a leader.
bool contains(const pane::item &item, const std::string &tag, const text_box &text_box)
A filter testing whether a search string is used in a text.
map_location find_vacant_tile(const map_location &loc, VACANT_TILE_TYPE vacancy, const unit *pass_check, const team *shroud_check, const game_board *board)
Function that will find a location on the board that is as near to loc as possible, but which is unoccupied by any units.
A refinement of paths for use when calculating jamming.
marked_route(const marked_route &rhs)
The basic "size" of the unit - flying, small land, large land, etc.
bool operator==(const mark &m) const
const int total_movement_
A single unit type that the player may recruit.
static double getNoPathValue()
This class stores all the data for a single 'side' (in game nomenclature).
std::vector< map_location > steps
bool const ignore_defense_
Structure which holds a single route between one location and another.
const bool allow_teleport_
Encapsulates the map of the game.
Function which only uses terrain, ignoring shroud, enemies, etc.
Structure which holds a single route and marks for special events.
int move_cost
Movement cost for reaching the end of the route.
Encapsulates the map of the game.
mark(int turns_number=0, bool in_zoc=false, bool do_capture=false, bool is_invisible=false)
Ordered vector of possible destinations.
const std::vector< team > & teams_
Structure which uses find_routes() to build a cost map This maps each hex to a the movements a unit w...
const team & viewing_team_
std::string & insert(std::string &str, const std::size_t pos, const std::string &insert)
Insert a UTF-8 string at the specified position.
A refinement of paths for use when calculating vision.
const bool force_ignore_zoc_
std::map< map_location, mark > mark_map
const team & viewing_team_
virtual double cost(const map_location &loc, const double so_far) const =0
std::set< map_location > edges
The edges are the non-destination hexes bordering the destinations.
const int total_movement_
Object which contains all the possible locations a unit can move to, with associated best routes to t...
const movetype & movement_type_
plain_route a_star_search(const map_location &src, const map_location &dst, double stop_at, const cost_calculator &calc, const std::size_t width, const std::size_t height, const teleport_map *teleports, bool border)
const team & viewing_team_
std::vector< map_location > & steps
virtual ~cost_calculator()