BattleHelper.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef __BATTLE_HELPER__
  2. #define __BATTLE_HELPER__
  3. #include "Common.h"
  4. namespace GeniusAI { namespace BattleAI {
  5. class CBattleHelper
  6. {
  7. public:
  8. CBattleHelper();
  9. ~CBattleHelper();
  10. int GetBattleFieldPosition(int x, int y);
  11. int DecodeXPosition(int battleFieldPosition);
  12. int DecodeYPosition(int battleFieldPosition);
  13. int GetShortestDistance(int pointA, int pointB);
  14. int GetDistanceWithObstacles(int pointA, int pointB);
  15. int GetVoteForMaxDamage() const { return m_voteForMaxDamage; }
  16. int GetVoteForMinDamage() const { return m_voteForMinDamage; }
  17. int GetVoteForMaxSpeed() const { return m_voteForMaxSpeed; }
  18. int GetVoteForDistance() const { return m_voteForDistance; }
  19. int GetVoteForDistanceFromShooters() const { return m_voteForDistanceFromShooters; }
  20. int GetVoteForHitPoints() const { return m_voteForHitPoints; }
  21. const int InfiniteDistance;
  22. const int BattlefieldWidth;
  23. const int BattlefieldHeight;
  24. private:
  25. int m_voteForMaxDamage;
  26. int m_voteForMinDamage;
  27. int m_voteForMaxSpeed;
  28. int m_voteForDistance;
  29. int m_voteForDistanceFromShooters;
  30. int m_voteForHitPoints;
  31. CBattleHelper(const CBattleHelper &);
  32. CBattleHelper &operator=(const CBattleHelper &);
  33. };
  34. }}
  35. #endif/*__BATTLE_HELPER__*/