BWAPI
BTHAI/SCProjects/BTHAIModule/Source/PFFunctions.h
Go to the documentation of this file.
00001 #ifndef __PFFUNCTIONS_H__
00002 #define __PFFUNCTIONS_H__
00003 
00004 #include "BaseAgent.h"
00005 #include <BWAPI.h>
00006 
00007 using namespace BWAPI;
00008 using namespace std;
00009 
00015 class PFFunctions {
00016 
00017 private:
00018         static int getSize(UnitType type);
00019 
00020 public:
00021 
00023         static float getDistance(Position p1, Position p2);
00024 
00026         static float getDistance(Position pos, Unit* unit);
00027 
00029         static float calcOwnUnitP(float d, Unit* unit, Unit* otherOwnUnit);
00030 
00033         static float calcAvoidWorkerP(float d, BaseAgent* unit, BaseAgent* oUnit);
00034 
00036         static float calcMineP(float d, Unit* unit);
00037 
00039         static float calcOwnUnitMedicP(float d, Unit* unit, Unit* otherOwnUnit);
00040         
00042         static float calcNavigationP(float d);
00043 
00045         static float getNavigationP(Position cPos, Position goal);
00046 
00048         static float calcAttackingUnitP(float d, Unit* attacker, Unit* enemy, bool defensive);
00049 
00051         static float calcDefensiveUnitP(float d, Unit* ownUnit, Unit* enemy);
00052 
00054         static bool canAttack(Unit* ownUnit, Unit* target);
00055         
00056 };
00057 
00058 #endif
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines