home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 11 Learning / 09 Laramée / Simulation.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-08-22  |  898 b   |  39 lines

  1. /****************************************************************
  2.  * CLASS Simulation
  3.  * The object running the process of "testing" a troll against
  4.  * several representative cases
  5.  ****************************************************************/
  6.  
  7. #ifndef SIMULATION_H
  8. #define SIMULATION_H
  9.  
  10. #include "WorldGrid.h"
  11. #include "Entities.h"
  12. #include "Troll.h"
  13.  
  14. class Simulation
  15. {
  16.     // The three test cases
  17.     WorldGrid * Grids[ 3 ];
  18.  
  19.     // Arrays of pointers to the entities in each grid
  20.     Entity * EntityTable[ 3 ][ MAX_ENTITIES ];
  21.  
  22.     // Working copies trashed by each troll
  23.     WorldGrid WorkingGrid;
  24.     Entity * WorkingTable[ MAX_ENTITIES ];
  25.  
  26. public:
  27.     // Construction
  28.     Simulation();
  29.     Simulation( int x, int y );
  30.  
  31.     // Making test cases for the evolution process
  32.     void BuildTestCases();
  33.  
  34.     // Running a troll through all test cases
  35.     double RunSim( Troll & troll );
  36. };
  37.  
  38.  
  39. #endif