// AI functions added 3/12/99 23:11 MST #ifndef _PACMAN_H_ #define _PACMAN_H_ #include "maze.h" class Pacman { public: static const int NUM_PERSONALITIES; enum Personality { Straighty, Psycho, Fraidy, DotEater, DotHater, WallFollowerRight, WallFollowerLeft, WallFollowerRandom }; bool move (); bool deathCheck(); void newGame(); void newGeneration(); bool isAlive (); static Maze * maze; bool dotEater(); bool dotHater(); bool psycho(); bool fraidy(); bool straighty(); bool wallFollowerRight(); bool wallFollowerLeft(); bool wallFollowerRandom(); private: Personality personality; int lastDirection; int consec; int x, y; bool alive; void newPersonality (); void die (); bool directionOK(int dir); void makeMove(int dir); bool psychoOK(int direction); bool ghostInSight(); int initCheck(); void randomArray(int chance[4]); }; #endif