2007-07-28 18:23:15 +03:00
|
|
|
#ifndef CGAMESTATE_H
|
|
|
|
#define CGAMESTATE_H
|
|
|
|
|
2007-10-16 20:46:01 +03:00
|
|
|
#include "mapHandler.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-10-16 20:46:01 +03:00
|
|
|
//std::vector<std::vector<std::vector<char> > > fogOfWarMap; //true - visible, false - hidden
|
|
|
|
PseudoV< PseudoV< PseudoV<unsigned 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-09-18 16:30:26 +03:00
|
|
|
PlayerState():color(-1){};
|
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-09-18 16:30:26 +03:00
|
|
|
|
|
|
|
int day; //total number of days in game
|
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-30 19:16:00 +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
|