15 #ifndef GAME_BOARD_HPP_INCLUDED
16 #define GAME_BOARD_HPP_INCLUDED
26 #include <boost/optional.hpp>
27 #include <boost/scoped_ptr.hpp>
28 #include <boost/shared_ptr.hpp>
61 boost::scoped_ptr<gamemap>
map_;
97 virtual const std::vector<team> &
teams()
const {
return teams_; }
122 void check_victory(
bool &,
bool &,
bool &,
bool &, std::set<unsigned> &,
bool);
126 void side_drop_to (
int side_num, team::CONTROLLER ctrl, team::PROXY_CONTROLLER proxy = team::PROXY_CONTROLLER::PROXY_HUMAN);
void set_all_units_user_end_turn()
virtual const unit_map & units() const
void heal_all_survivors()
n_unit::id_manager unit_id_manager_
void write_config(config &cfg) const
void swap(game_board &one, game_board &other)
boost::scoped_ptr< gamemap > map_
void overlay_map(const gamemap &o, const config &cfg, map_location loc, bool border)
virtual const std::vector< team > & teams() const
bool team_is_defeated(const team &t) const
Calculates whether a team is defeated.
GLdouble GLdouble GLdouble b
This class stores all the data for a single 'side' (in game nomenclature).
virtual ~temporary_unit_remover()
game_board & operator=(game_board other)
std::vector< team > teams_
temporary_unit_remover(unit_map &m, const map_location &loc)
unit * get_visible_unit(const map_location &loc, const team ¤t_team, bool see_all=false)
void side_drop_to(int side_num, team::CONTROLLER ctrl, team::PROXY_CONTROLLER proxy=team::PROXY_CONTROLLER::PROXY_HUMAN)
friend void swap(game_board &one, game_board &other)
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.
void check_victory(bool &, bool &, bool &, bool &, std::set< unsigned > &, bool)
virtual ~temporary_unit_mover()
This object is used to temporary remove a unit from the unit map.
temporary_unit_placer(unit_map &m, const map_location &loc, unit &u)
std::vector< std::string > labels_
Encapsulates the map of the game.
unit_map::iterator find_visible_unit(const map_location &loc, size_t team, bool see_all=false)
virtual ~temporary_unit_placer()
bool has_visible_unit(const map_location &loc, const team &team, bool see_all=false) const
unit_map::iterator find_unit(const map_location &loc)
bool change_terrain(const map_location &loc, const std::string &t, const std::string &mode, bool replace_if_failed)
GLdouble GLdouble GLdouble r
game_board(const tdata_cache &tdata, const config &level)
Handling of system events.
virtual const gamemap & map() const
GLint GLint GLsizei GLsizei GLsizei GLint border
temporary_unit_mover(unit_map &m, const map_location &src, const map_location &dst, int new_moves)
Constructor This version will change the unit's current movement to new_moves while the unit is moved...
boost::optional< std::string > replace_map(const gamemap &r)
n_unit::id_manager & unit_id_manager()
bool has_visible_unit(const map_location &loc, size_t team, bool see_all=false) const
Container associating units to locations.
unit_iterator find(size_t id)
bool try_add_unit_to_recall_list(const map_location &loc, const unit_ptr u)
virtual const std::vector< std::string > & hidden_label_categories() const
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string
unit_map::iterator find_visible_unit(const map_location &loc, const team ¤t_team, bool see_all=false)
This object is used to temporary move a unit in the unit map, swapping out any unit that is already t...
void side_change_controller(int side_num, bool is_local, const std::string &pname="")