CGameState.h 769 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef CGAMESTATE_H
  2. #define CGAMESTATE_H
  3. class CHeroInstance;
  4. class CTownInstance;
  5. class CCallback;
  6. struct PlayerState
  7. {
  8. public:
  9. int color;
  10. std::vector<std::vector<std::vector<char> > >fogOfWarMap; //true - visible, false - hidden
  11. std::vector<int> resources;
  12. std::vector<CHeroInstance *> heroes;
  13. std::vector<CTownInstance *> towns;
  14. PlayerState():color(-1){};
  15. };
  16. class CGameState
  17. {
  18. int currentPlayer;
  19. int day; //total number of days in game
  20. std::map<int,PlayerState> players; //color <-> playerstate
  21. public:
  22. friend CCallback;
  23. friend int _tmain(int argc, _TCHAR* argv[]);
  24. friend void initGameState(CGameInfo * cgi);
  25. //CCallback * cb; //for communication between PlayerInterface/AI and GameState
  26. };
  27. #endif //CGAMESTATE_H