mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
16a1861fc4
* functions for getting info about heroes in CCallback * function for initializing GameState * improvements in CHeroInstance * added codename * minor stuff
31 lines
732 B
C++
31 lines
732 B
C++
#ifndef CGAMESTATE_H
|
|
#define CGAMESTATE_H
|
|
|
|
class CHeroInstance;
|
|
class CTownInstance;
|
|
class CCallback;
|
|
|
|
struct PlayerState
|
|
{
|
|
public:
|
|
int color;
|
|
std::vector<std::vector<std::vector<char> > >fogOfWarMap; //true - visible, false - hidden
|
|
std::vector<int> resources;
|
|
std::vector<CHeroInstance *> heroes;
|
|
std::vector<CTownInstance *> towns;
|
|
};
|
|
|
|
class CGameState
|
|
{
|
|
int currentPlayer;
|
|
std::map<int,PlayerState> players; //color <-> playerstate
|
|
public:
|
|
friend CCallback;
|
|
friend int _tmain(int argc, _TCHAR* argv[]);
|
|
friend void initGameState(CGameInfo * cgi);
|
|
friend void CAmbarCendamo::deh3m();
|
|
CCallback * cb; //for communication between PlayerInterface/AI and GameState
|
|
};
|
|
|
|
#endif //CGAMESTATE_H
|