mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-20 20:23:03 +02:00
1906060bc6
* project was reorganized - now there is possibility to work simultaneously on battle AI and general AI
45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
#ifndef __BATTLE_HELPER__
|
|
#define __BATTLE_HELPER__
|
|
|
|
#include "Common.h"
|
|
|
|
namespace GeniusAI { namespace BattleAI {
|
|
|
|
class CBattleHelper
|
|
{
|
|
public:
|
|
CBattleHelper();
|
|
~CBattleHelper();
|
|
|
|
int GetBattleFieldPosition(int x, int y);
|
|
int DecodeXPosition(int battleFieldPosition);
|
|
int DecodeYPosition(int battleFieldPosition);
|
|
|
|
int GetShortestDistance(int pointA, int pointB);
|
|
int GetDistanceWithObstacles(int pointA, int pointB);
|
|
|
|
int GetVoteForMaxDamage() const { return m_voteForMaxDamage; }
|
|
int GetVoteForMinDamage() const { return m_voteForMinDamage; }
|
|
int GetVoteForMaxSpeed() const { return m_voteForMaxSpeed; }
|
|
int GetVoteForDistance() const { return m_voteForDistance; }
|
|
int GetVoteForDistanceFromShooters() const { return m_voteForDistanceFromShooters; }
|
|
int GetVoteForHitPoints() const { return m_voteForHitPoints; }
|
|
|
|
const int InfiniteDistance;
|
|
const int BattlefieldWidth;
|
|
const int BattlefieldHeight;
|
|
private:
|
|
int m_voteForMaxDamage;
|
|
int m_voteForMinDamage;
|
|
int m_voteForMaxSpeed;
|
|
int m_voteForDistance;
|
|
int m_voteForDistanceFromShooters;
|
|
int m_voteForHitPoints;
|
|
|
|
CBattleHelper(const CBattleHelper &);
|
|
CBattleHelper &operator=(const CBattleHelper &);
|
|
};
|
|
|
|
}}
|
|
|
|
#endif/*__BATTLE_HELPER__*/ |