31 std::string
name()
const {
return "cave"; }
35 std::string
create_map(utils::optional<uint32_t> randomseed = {});
52 std::set<map_location>
locs;
cave_map_generator(const config &game_config)
t_translation::terrain_code keep_
t_translation::terrain_code village_
std::string create_map(utils::optional< uint32_t > randomseed={})
Creates a new map and returns it.
config create_scenario(utils::optional< uint32_t > randomseed={})
t_translation::terrain_code clear_
t_translation::terrain_code castle_
std::string name() const
Returns a string identifying the generator by name.
bool on_board(const map_location &loc) const
std::string config_name() const
Return a friendly name for the generator used to differentiate between different configs of the same ...
t_translation::terrain_code wall_
A config object defines a single node in a WML file, with access to child nodes.
Definitions for the interface to Wesnoth Markup Language (WML).
Game configuration data as global variables.
boost::bimaps::bimap< boost::bimaps::set_of< std::string >, boost::bimaps::multiset_of< coordinate > > starting_positions
std::size_t size(std::string_view str)
Length in characters of a UTF-8 string.
std::set< map_location > locs
passage(map_location s, map_location d, const config &c)
void set_terrain(map_location loc, const t_translation::terrain_code &t)
std::vector< chamber > chambers_
void place_chamber(const chamber &c)
cave_map_generator_job(const cave_map_generator ¶ms, utils::optional< uint32_t > randomseed={})
const cave_map_generator & params
void build_chamber(map_location loc, std::set< map_location > &locs, std::size_t size, std::size_t jagged)
std::size_t translate_x(std::size_t x) const
void place_passage(const passage &p)
t_translation::starting_positions starting_positions_
std::size_t translate_y(std::size_t y) const
t_translation::ter_map map_
std::vector< passage > passages_
void place_castle(int starting_position, const map_location &loc)
std::map< std::string, std::size_t > chamber_ids_
Encapsulates the map of the game.
A terrain string which is converted to a terrain is a string with 1 or 2 layers the layers are separa...
static map_location::direction s