1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-03 23:19:22 +02:00
Files
vcmi/AI/GeniusAI/BattleHelper.h
beegee1 7f04ed990b Major refactoring. First part: BattleInterface
Introduction of pre compiled headers,...
2011-12-13 21:23:17 +00:00

49 lines
1.3 KiB
C++

#pragma once
#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 StepDownright(int pos);
int StepUpright(int pos);
int StepDownleft(int pos);
int StepUpleft(int pos);
int StepRight(int pos);
int StepLeft(int pos);
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 &);
};
}}