NewTurnProcessor.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * NewTurnProcessor.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "../../lib/constants/EntityIdentifiers.h"
  12. #include "../../lib/constants/Enumerations.h"
  13. #include "../../lib/gameState/RumorState.h"
  14. VCMI_LIB_NAMESPACE_BEGIN
  15. class CGTownInstance;
  16. class ResourceSet;
  17. struct SetAvailableCreatures;
  18. struct SetMovePoints;
  19. struct SetMana;
  20. struct InfoWindow;
  21. struct NewTurn;
  22. VCMI_LIB_NAMESPACE_END
  23. class CGameHandler;
  24. class NewTurnProcessor : boost::noncopyable
  25. {
  26. CGameHandler * gameHandler;
  27. std::vector<SetMana> updateHeroesManaPoints();
  28. std::vector<SetMovePoints> updateHeroesMovementPoints();
  29. ResourceSet generatePlayerIncome(PlayerColor playerID, bool newWeek);
  30. SetAvailableCreatures generateTownGrowth(const CGTownInstance * town, EWeekType weekType, CreatureID creatureWeek, bool firstDay);
  31. RumorState pickNewRumor();
  32. InfoWindow createInfoWindow(EWeekType weekType, CreatureID creatureWeek, bool newMonth);
  33. std::tuple<EWeekType, CreatureID> pickWeekType(bool newMonth);
  34. NewTurn generateNewTurnPack();
  35. void handleTimeEvents(PlayerColor player);
  36. void handleTownEvents(const CGTownInstance *town);
  37. public:
  38. NewTurnProcessor(CGameHandler * gameHandler);
  39. void onNewTurn();
  40. void onPlayerTurnStarted(PlayerColor color);
  41. void onPlayerTurnEnded(PlayerColor color);
  42. };