WorldSim  inDev
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
World_Astronomy.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef WORLDSIM_WORLD_ASTRONOMY_HPP
3 #define WORLDSIM_WORLD_ASTRONOMY_HPP
4 
5 /* WorldSim: World_Astronomy.hpp
6  #include "World_Astronomy.hpp" */
7 
32 #include <Game/Language/NameGenerator.cpp>
33 #include <Container/Vector/Vector.hpp>
34 
35 
37 {
38  private:
39 
40  public:
41  std::string sunName;
42 
43  Vector <std::string> vMoon;
44  Vector <std::string> vPlanet;
45 
47  {
48  sunName="";
49  }
50 
51  void generateSystem (int nMoon, int nPlanet)
52  {
53  sunName = globalNameGen.generate();
54 
55  vMoon.clear();
56  vPlanet.clear();
57 
58  for (int i=0;i<nMoon;++i)
59  {
60  vMoon.push(globalNameGen.generate());
61  }
62 
63  for (int i=0;i<nPlanet;++i)
64  {
65  vPlanet.push(globalNameGen.generate());
66  }
67  }
68 
69 };
70 
71 #endif
std::string sunName
Definition: World_Astronomy.hpp:41
World astronomical detail container This class stores astronomical data from the perspective of the W...
Definition: World_Astronomy.hpp:36
NameGenerator globalNameGen
Definition: Driver_GlobalObjects.hpp:22
void generateSystem(int nMoon, int nPlanet)
Definition: World_Astronomy.hpp:51
Vector< std::string > vPlanet
Definition: World_Astronomy.hpp:44
World_Astronomy()
Definition: World_Astronomy.hpp:46
Vector< std::string > vMoon
Definition: World_Astronomy.hpp:43