Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
|
Name generator is pretty straightforward Format: More...
#include <namegenerator.h>
Public Member Functions | |
std::string | Generate (const std::string &rule_name) |
void | LoadNameGenerator (const Hjson::Value &value) |
void | SetRandom (util::IRandom *rand) |
const std::string & | GetName () |
Private Attributes | |
std::map< std::string, std::vector< std::string > > | syllables_list |
std::map< std::string, std::string > | rule_list |
std::string | name |
util::IRandom * | random |
Name generator is pretty straightforward Format:
The format string is processed in fmt, so it would look like this: {[syllable 1 name]}{[syllable 2 name]}
.
For each syllable, a random syllable will be selected from the array, according to the random generator that you provide, and formatted into the string.
In the future, I would like to have a more adaptable naming scheme capable of naming cities and other things after people and the events, but for now a simple name generator would do.
std::string NameGenerator::Generate | ( | const std::string & | rule_name | ) |
|
inline |
void NameGenerator::LoadNameGenerator | ( | const Hjson::Value & | value | ) |
|
inline |
|
private |
|
private |
|
private |
|
private |