2007-07-28 18:23:15 +03:00
|
|
|
#ifndef CGAMESTATE_H
|
|
|
|
#define CGAMESTATE_H
|
|
|
|
|
2007-08-29 15:18:31 +03:00
|
|
|
class CHeroInstance;
|
|
|
|
class CTownInstance;
|
2007-08-27 17:15:03 +03:00
|
|
|
class CCallback;
|
2007-08-29 15:18:31 +03:00
|
|
|
|
2007-07-28 18:23:15 +03:00
|
|
|
struct PlayerState
|
|
|
|
{
|
2007-08-04 22:01:22 +03:00
|
|
|
public:
|
2007-07-28 18:23:15 +03:00
|
|
|
int color;
|
2007-08-30 13:11:53 +03:00
|
|
|
std::vector<std::vector<std::vector<char> > >fogOfWarMap; //true - visible, false - hidden
|
2007-07-28 18:23:15 +03:00
|
|
|
std::vector<int> resources;
|
2007-08-29 15:18:31 +03:00
|
|
|
std::vector<CHeroInstance *> heroes;
|
|
|
|
std::vector<CTownInstance *> towns;
|
2007-07-29 02:01:25 +03:00
|
|
|
};
|
2007-07-28 18:23:15 +03:00
|
|
|
|
|
|
|
class CGameState
|
|
|
|
{
|
2007-08-04 22:01:22 +03:00
|
|
|
int currentPlayer;
|
2007-07-29 02:01:25 +03:00
|
|
|
std::map<int,PlayerState> players; //color <-> playerstate
|
2007-08-27 17:15:03 +03:00
|
|
|
public:
|
|
|
|
friend CCallback;
|
|
|
|
friend int _tmain(int argc, _TCHAR* argv[]);
|
2007-09-14 16:11:10 +03:00
|
|
|
friend void initGameState(CGameInfo * cgi);
|
2007-09-05 18:56:35 +03:00
|
|
|
friend void CAmbarCendamo::deh3m();
|
2007-08-27 17:15:03 +03:00
|
|
|
CCallback * cb; //for communication between PlayerInterface/AI and GameState
|
2007-07-29 02:01:25 +03:00
|
|
|
};
|
2007-07-28 18:23:15 +03:00
|
|
|
|
2007-09-14 16:11:10 +03:00
|
|
|
#endif //CGAMESTATE_H
|