2007-08-27 17:15:03 +03:00
|
|
|
#ifndef CCALLBACK_H
|
|
|
|
#define CCALLBACK_H
|
|
|
|
class CGameState;
|
2007-09-14 16:11:10 +03:00
|
|
|
class CHeroInstance;
|
2007-09-18 16:30:26 +03:00
|
|
|
class CTownInstance;
|
2007-08-29 13:05:50 +03:00
|
|
|
struct HeroMoveDetails
|
|
|
|
{
|
|
|
|
int3 src, dst; //source and destination points
|
|
|
|
int heroID; //which hero
|
|
|
|
int owner;
|
|
|
|
};
|
2007-08-27 17:15:03 +03:00
|
|
|
class CCallback
|
|
|
|
{
|
2007-09-14 16:11:10 +03:00
|
|
|
private:
|
|
|
|
void newTurn();
|
|
|
|
|
2007-08-27 17:15:03 +03:00
|
|
|
protected:
|
|
|
|
CGameState * gs;
|
2007-08-29 13:05:50 +03:00
|
|
|
|
2007-08-27 17:15:03 +03:00
|
|
|
public:
|
2007-09-14 16:11:10 +03:00
|
|
|
CCallback(CGameState * GS):gs(GS){};
|
2007-08-27 17:15:03 +03:00
|
|
|
bool moveHero(int ID, int3 destPoint);
|
2007-09-14 16:11:10 +03:00
|
|
|
|
2007-09-18 16:30:26 +03:00
|
|
|
int howManyTowns();
|
|
|
|
const CTownInstance * getTownInfo(int val, bool mode); //mode = 0 -> val = serial; mode = 1 -> val = ID
|
|
|
|
|
2007-09-14 16:11:10 +03:00
|
|
|
int howManyHeroes(int player);
|
|
|
|
const CHeroInstance * getHeroInfo(int player, int val, bool mode); //mode = 0 -> val = serial; mode = 1 -> val = ID
|
2007-09-16 20:21:23 +03:00
|
|
|
int getResourceAmount(int type);
|
2007-09-18 16:30:26 +03:00
|
|
|
int getDate(int mode=0); //mode=0 - total days in game, mode=1 - day of week, mode=2 - current week, mode=3 - current month
|
2007-08-27 17:15:03 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //CCALLBACK_H
|