1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
vcmi/CGameInterface.h

39 lines
1.0 KiB
C
Raw Normal View History

#ifndef CGAMEINTERFACE_H
#define CGAMEINTERFACE_H
#include "global.h"
#include "CCallback.h"
BOOST_TRIBOOL_THIRD_STATE(outOfRange)
using namespace boost::logic;
class CCallback;
class CGlobalAI;
class CGHeroInstance;
class CGameInterface
{
public:
bool human;
int playerID, serialID;
2007-10-21 19:45:13 +03:00
virtual void init(CCallback * CB)=0{};
virtual void yourTurn()=0{};
virtual void heroKilled(const CGHeroInstance*)=0{};
virtual void heroCreated(const CGHeroInstance*)=0{};
virtual void heroPrimarySkillChanged(const CGHeroInstance * hero, int which, int val)=0{};
virtual void heroMoved(const HeroMoveDetails & details)=0{};
2007-11-25 15:16:45 +02:00
virtual void receivedResource(int type, int val){};
};
2007-10-21 19:45:13 +03:00
class CAIHandler
{
public:
static CGlobalAI * getNewAI(CCallback * cb, std::string dllname);
};
2007-08-25 07:56:25 +03:00
class CGlobalAI : public CGameInterface // AI class (to derivate)
{
public:
2007-10-21 19:45:13 +03:00
//CGlobalAI();
virtual void yourTurn(){};
virtual void heroKilled(const CGHeroInstance*){};
virtual void heroCreated(const CGHeroInstance*){};
};
#endif //CGAMEINTERFACE_H