00001 00011 #ifndef BOTAI_H 00012 #define BOTAI_H 00013 00014 #include <list> 00015 #include "tilemap.h" 00016 #include "botinfo.h" 00017 #include "weapon.h" 00018 #include "bullet.h" 00019 00020 using std::list; 00021 00033 class CBotAI 00034 { 00035 public: 00040 enum TBotMovingDir {EMoveForward, EMoveBackwards, EMoveLeft, EMoveRight}; 00041 00043 CBotAI(); 00044 00046 virtual ~CBotAI(); 00047 00052 virtual void think() = 0; 00053 00062 virtual void init(int &aSpeed, int &aArmour, int &aAiming); 00063 00065 void resetAction(); 00066 00073 void move(TBotMovingDir aDir); 00074 00082 void shoot(float aDir); 00083 00089 void bunker(); 00090 00096 void pickWeapon(); 00097 00103 void dropWeapon(); 00104 00106 int action(); 00107 00116 bool checkAction(); 00117 00119 CTileMap *mTileMap; 00120 00122 list<CVisibleBotInfo *> mBots; 00123 00125 list<CVisibleWeaponInfo *> aWeapons; 00126 00128 list<CVisibleBulletInfo *> mBullets; 00129 00131 list<float> mSourcesOfNoise; 00132 00134 CBotInfo mData; 00135 00136 private: 00137 int mAction; 00138 TBotMovingDir mMovingDir; 00139 float mShootingDir; 00140 }; 00141 00143 typedef CBotAI *(*)() TBotAIGetter; 00144 00146 CBotAI *getBotAI(); 00147 00148 00149 #endif // BOTAI_H