src/Cell.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 CELL_H
00026 #define CELL_H
00027 
00028 #include <GL/glut.h>
00029 #include <list>
00030 #include <map>
00031 
00032 #include "Drawable.h"
00033 
00034 class Worshiper;
00035 class Pheromone;
00036 
00040 class Cell  : public Drawable
00041 {
00042 protected:
00043 
00045   static GLuint _tex_name;
00046 
00052   virtual GLuint getTexName();
00053 
00061   virtual void getColors(GLubyte &red, GLubyte &green, GLubyte &blue);
00062 
00066   Cell();
00067 
00068 public:
00069 
00073   virtual ~Cell();
00074 
00078   virtual void draw();
00079 
00085   virtual unsigned int getFood();
00086 
00093   virtual unsigned int addFood(unsigned int inc);
00094 
00101   virtual unsigned int subFood(unsigned int inc);
00102 
00109   virtual bool reachable(Worshiper *w);
00110 
00116   virtual std::list<Worshiper*>* getPeople();
00117 
00124   virtual std::map<Pheromone*, unsigned int>* getPheromones();
00125 
00132   virtual bool addWorshiper(Worshiper *w);
00133 
00140   virtual bool removeWorshiper(const Worshiper *w);
00141 
00148   virtual void addPheromone(Pheromone *p);
00149 
00155   virtual Cell* makeActions();
00156 };
00157 
00158 #endif // CELL_H

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