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

  1. /***************************************************************
  2.  * Some global constants...
  3.  **************************************************************/
  4.  
  5. #ifndef GLOBALS_H
  6. #define GLOBALS_H
  7.  
  8. // the types of entities found in the world
  9. enum 
  10.     ENTITY_NULL, 
  11.     ENTITY_SHEEP, 
  12.     ENTITY_KNIGHT, 
  13.     ENTITY_TOWER, 
  14.     ENTITY_TRAP, 
  15.     ENTITY_HAVEN, 
  16.     ENTITY_TROLL 
  17. };
  18.  
  19. // parameters of the game world
  20. enum
  21.     WORLD_GRID_SIZE = 30,
  22.     FULL_HEALTH = 50,
  23.     REASONABLY_HEALTHY = 35,
  24.     HEAVILY_DAMAGED = 20,
  25.     CRITICALLY_DAMAGED = 10,
  26.     MAX_ENTITIES = 100,
  27. };
  28.  
  29. // The genes on a chromosome
  30. enum 
  31.     EATING_PRIORITY, 
  32.     HEALING_PRIORITY,
  33.     KILLING_PRIORITY,
  34.     FLEEING_PRIORITY,
  35.     EXPLORING_PRIORITY,
  36.     ALL_PRIORITIES
  37. };
  38.  
  39.  
  40. // The parameters of the Genetic Algorithm
  41. enum
  42. {
  43.     GA_GENERATIONS = 100,
  44.     GA_POPULATION_SIZE = 300,
  45.     MUTATION_RATE = 3
  46. };
  47.  
  48. #endif
  49.