27 #define ERR_NG LOG_STREAM(err, log_mapgen)
28 #define LOG_NG LOG_STREAM(info, log_mapgen)
55 int main(
int argc,
char** argv)
57 int x = 50, y = 50, iterations = 50,
58 hill_size = 50, lakes=3,
59 nvillages = 25, nplayers = 2;
88 srand(std::time(
nullptr));
89 std::cout << generate_map(x,y,iterations,hill_size,lakes,nvillages,nplayers) <<
"\n";
A config object defines a single node in a WML file, with access to child nodes.
virtual config create_scenario(utils::optional< uint32_t > randomseed={})
virtual std::string create_map(utils::optional< uint32_t > randomseed={})=0
Creates a new map and returns it.
virtual void user_config()
Display the interactive screen, which allows the user to modify how the generator behaves.
virtual bool allow_user_config() const
Returns true if the map generator has an interactive screen, which allows the user to modify how the ...
Definitions for the interface to Wesnoth Markup Language (WML).
Standard logging facilities (interface).
static lg::log_domain log_mapgen("mapgen")
int stoi(std::string_view str)
Same interface as std::stoi and meant as a drop in replacement, except: