53 std::unique_ptr<gamemap>
map_;
82 virtual const std::vector<team>&
teams()
const override 96 return teams_.at(i - 1);
138 void write_config(
config & cfg)
const;
142 void new_turn(
int pnum);
143 void end_turn(
int pnum);
144 void set_all_units_user_end_turn();
146 void heal_all_survivors();
148 void check_victory(
bool &,
bool &,
bool &,
bool &, std::set<unsigned> &,
bool);
152 void side_drop_to (
int side_num, team::CONTROLLER ctrl, team::PROXY_CONTROLLER proxy = team::PROXY_CONTROLLER::PROXY_HUMAN);
153 void side_change_controller (
int side_num,
bool is_local,
const std::string& pname,
const std::string& controller_type);
158 std::optional<std::string> replace_map(
const gamemap & r);
160 bool change_terrain(
const map_location &loc,
const std::string &
t,
161 const std::string & mode,
bool replace_if_failed);
167 bool has_visible_unit (
const map_location & loc,
const team &
team,
bool see_all =
false)
const;
176 bool team_is_defeated(
const team& t)
const;
std::unique_ptr< gamemap > map_
unit_map::iterator find_visible_unit(const map_location &loc, std::size_t team, bool see_all=false)
virtual const std::vector< std::string > & hidden_label_categories() const override
const team & get_team(int side) const
virtual const std::vector< team > & teams() const override
virtual const unit_map & units() const override
This class represents a single unit of a specific type.
n_unit::id_manager unit_id_manager_
void swap(game_board &one, game_board &other)
virtual const gamemap & map() const override
virtual std::vector< std::string > & hidden_label_categories() override
std::shared_ptr< unit > unit_ptr
This class stores all the data for a single 'side' (in game nomenclature).
std::vector< team > teams_
This object is used to temporary place a unit in the unit map, swapping out any unit that is already ...
Encapsulates the map of the game.
This object is used to temporary remove a unit from the unit map.
std::vector< std::string > labels_
Encapsulates the map of the game.
static const unit * get_visible_unit(reports::context &rc)
unit_iterator find(std::size_t id)
unit_map::iterator find_unit(const map_location &loc)
Handling of system events.
n_unit::id_manager & unit_id_manager()
bool has_visible_unit(const map_location &loc, std::size_t team, bool see_all=false) const
std::vector< team > & teams()
Container associating units to locations.
A config object defines a single node in a WML file, with access to child nodes.
This object is used to temporary move a unit in the unit map, swapping out any unit that is already t...