00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef MAP_GEN_HPP_INCLUDED
00019 #define MAP_GEN_HPP_INCLUDED
00020
00021 class config;
00022 class display;
00023
00024 #include "map.hpp"
00025
00026 #include <map>
00027 #include <string>
00028 #include <vector>
00029
00030 class map_generator
00031 {
00032 public:
00033 virtual ~map_generator() {}
00034
00035
00036
00037 virtual bool allow_user_config() const = 0;
00038
00039
00040
00041
00042 virtual void user_config(display& disp) = 0;
00043
00044
00045
00046 virtual std::string name() const = 0;
00047
00048
00049
00050 virtual std::string create_map(const std::vector<std::string>& args) = 0;
00051
00052 virtual config create_scenario(const std::vector<std::string>& args);
00053 };
00054
00055 std::string default_generate_map(size_t width, size_t height, size_t island_size, size_t island_off_center,
00056 size_t iterations, size_t hill_size,
00057 size_t max_lakes, size_t nvillages, size_t castle_size, size_t nplayers,
00058 bool roads_between_castles, std::map<gamemap::location,std::string>* labels,
00059 const config& cfg);
00060
00061 #endif