src/Replication.h

Go to the documentation of this file.
00001 
00008 /*
00009 This file is part of Teapot Colony Wars.
00010 
00011 Teapot Colony Wars is free software: you can redistribute it and/or modify
00012 it under the terms of the GNU General Public License as published by
00013 the Free Software Foundation, either version 2 of the License, or
00014 (at your option) any later version.
00015 
00016 Teapot Colony Wars is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 GNU General Public License for more details.
00020 
00021 You should have received a copy of the GNU General Public License
00022 along with Teapot Colony Wars.  If not, see <http://www.gnu.org/licenses/>.
00023 */
00024 
00025 #ifndef REPLICATION_H
00026 #define REPLICATION_H
00027 
00028 #include <list>
00029 
00030 class Colony;
00031 class Worshiper;
00032 class Behaviour;
00033 
00037 class Replication 
00038 {
00039 private:
00040 
00044   Colony * _colony;
00045 
00046 protected:
00047 
00051   std::list<Worshiper*>* _new_worshipers;
00052 
00056   Replication();
00057 
00063   unsigned int getNbWorshipers();
00064 
00070   unsigned int getFood() const;
00071 
00077   unsigned int getNbCells() const;
00078 
00079 public:
00080 
00086   void setColony(Colony * c);
00087 
00091   virtual ~Replication();
00092 
00098   virtual std::list<Worshiper*>* getNewWorshipers() = 0;
00099 
00108   virtual Worshiper* createWorshiper(unsigned int size,
00109     unsigned int food, Behaviour * b);
00110 
00116   virtual void addSurvivor(Worshiper * w);
00117 
00118 };
00119 
00120 #endif // REPLICATION_H

Generated on Sat Feb 2 22:22:54 2008 for Teapot Colony Wars by  doxygen 1.5.4