LifeExercise.cpp

Go to the documentation of this file.
00001 #include "macros.h" // needs to be declared as first entry in .cpp or .h file!
00002 #include <string>
00003 #include <iostream>
00004 using namespace std;
00005 #include "AbstractExercise.h"
00006 #include <ctime>
00007 #include <cstdlib>
00008 #include "Life001.h"
00009 // ...
00010 
00011 namespace {
00012     const int SIZE_X = 30;
00013     const int SIZE_Y = 20;
00014     const char ALIVE = '*';
00015     const char DEAD  = ' ';
00016     typedef char lifeMatrix_t[SIZE_X][SIZE_Y];
00017 }
00018 
00019 
00024 class LifeExercise : public AbstractExercise {
00025 public:
00026 
00027     LifeExercise(string name) : AbstractExercise(name){}
00028 
00029 protected:
00030 
00031     void execute();
00032 
00033 private:
00034     Life001 fLife;
00035 };
00036     
00037 namespace {
00038     LifeExercise proto("LifeExercise");
00039 }
00040 
00041 void LifeExercise::execute(){
00042     fLife.run();
00043 }
00044 
00045 

Generated on Thu Jul 3 19:12:45 2008 for Exercise Framework by  doxygen 1.5.1