57 std::unique_ptr<gamemap>
map_;
86 virtual const std::vector<team>&
teams()
const override 100 return teams_.at(i - 1);
142 void write_config(
config & cfg)
const;
146 void new_turn(
int pnum);
147 void end_turn(
int pnum);
148 void set_all_units_user_end_turn();
150 void heal_all_survivors();
152 void check_victory(
bool &,
bool &,
bool &,
bool &, std::set<unsigned> &,
bool);
157 void side_change_controller (
int side_num,
bool is_local,
const std::string& pname,
const std::string& controller_type);
162 std::optional<std::string> replace_map(
const gamemap & r);
164 bool change_terrain(
const map_location &loc,
const std::string &
t,
const std::string & mode,
bool replace_if_failed);
171 bool has_visible_unit (
const map_location & loc,
const team &
team,
bool see_all =
false)
const;
180 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
A terrain string which is converted to a terrain is a string with 1 or 2 layers the layers are separa...
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...