Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List

Creation.h

Go to the documentation of this file.
00001 /*
00002 Copyright 2005 Elliott Kleinrock, Dan Neely, Kurt W. Over, Damon Domjan
00003 
00004 This file is part of FreeStars, a free clone of the Stars! game.
00005 
00006 FreeStars is free software; you can redistribute it and/or modify
00007 it under the terms of the GNU General Public License as published by
00008 the Free Software Foundation; either version 2 of the License, or
00009 (at your option) any later version.
00010 
00011 FreeStars is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU General Public License for more details.
00015 
00016 You should have received a copy of the GNU General Public License
00017 along with FreeStars; if not, write to the Free Software
00018 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00020 The full GPL Copyright notice should be in the file COPYING.txt
00021 
00022 Contact:
00023 Email Elliott at 9jm0tjj02@sneakemail.com
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)

Generated on Mon Aug 8 21:33:42 2005 for Freestars by  doxygen 1.4.2-20050421