00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00030 #if !defined(Creation_h)
00031 #define Creation_h
00032
00033 #include <string>
00034 #include <deque>
00035 using namespace std;
00036
00040 class Creation {
00041 public:
00042 Creation();
00043 ~Creation();
00044
00045 bool LoadCreation(const TiXmlNode * options);
00046 bool LoadNames(const char * NameFile);
00047 void SetLocation(Planet * p);
00048
00049 long mWorlds;
00050
00051 long mMinDistance;
00052 double mClusterOdds;
00053 double mClusterOddsDegrade;
00054 double mCurrClusterOdds;
00055 long mClusterMaxDistance;
00056
00057 long mStartPositionCount;
00058 long mStartPositionMin;
00059 long mStartPositionMax;
00060
00061 long mHWBasePop;
00062 long mHWPopBonus;
00063 long mHWFactories;
00064 long mHWMines;
00065 long mHWDefenses;
00066
00067 bool mSecondaryWorlds;
00068 double mPopMultiplierFor2nd;
00069 double mSecondaryPop;
00070 long mSWFactories;
00071 long mSWMines;
00072 long mSWDefenses;
00073 long mSWMaxMin;
00074 long mSWMinMin;
00075 long mMinSWDistance;
00076 long mMaxSWDistance;
00077
00078 string GetNextName();
00079 void AddHW(Planet * p) { mPrePlacedHWs.push_back(p); }
00080 Planet * GetNextHW() { return mHW == mPrePlacedHWs.end() ? NULL : *mHW++; }
00081 Planet * GetSecond(const Player * p);
00082 void AddSecond(const Player * p, Planet * sw) { mSecondWorlds.insert(pair<const Player *, Planet *>(p, sw)); }
00083
00084 private:
00085 deque<string> mNames;
00086 deque<string>::iterator mNamePos;
00087 long mNameCount;
00088 deque<Planet *> mPrePlacedHWs;
00089 deque<Planet *>::iterator mHW;
00090 map<const Player *, Planet *> mSecondWorlds;
00091
00092 Planet * LastP;
00093 };
00094
00095 #endif // !defined(Creation_h)