WorldSim  inDev
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
Static_FloraGenerator.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef WORLDSIM_STATIC_FLORA_GENERATOR_HPP
3 #define WORLDSIM_STATIC_FLORA_GENERATOR_HPP
4 
5 /* WorldSim: Static_FloraGenerator
6  #include "Static_FloraGenerator.hpp"
7 
8  Class to generate random Flora within certain parameters.
9 
10  Subfunctionality of Biome objects.
11 
12 */
13 
14 class Flora;
15 class WordList;
16 
18 {
19  // It might be better practise to have a more centralised name generator which can handle all the different
20  // names to generate, for example Flora, cities, people, etc. However there is still a lot to implement here
21  // eg alchemy effects, before I'll look at doing that.
22  WordList wlistFloraPattern;
23  WordList wlistFloraColour;
24  WordList wlistFloraAdjective;
25  WordList wlistFloraNoun;
26  // For testing
27  WordList wlistFloraType;
28 
29  public:
31 
32  std::string generateName();
33 
34  // Flora generation.
35  // Name is randomly generated from wordlists.
36  // Current system makes each additional Flora half as common as the previous.
37  Vector <Flora*> * generate(int amount);
38 
39  // generate and return a single flora type
40  // note this is Flora type, not object.
41  Flora* get(const int spawnWeighting=0);
42 };
43 
44 
45 #endif
std::string generateName()
Definition: Static_FloraGenerator.cpp:53
FloraGenerator()
Definition: Static_FloraGenerator.cpp:16
Definition: Static_Flora.hpp:201
Definition: Static_FloraGenerator.hpp:17
Vector< Flora * > * generate(int amount)
Definition: Static_FloraGenerator.cpp:79