NewTurnProcessor.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. void updateNeutralTownGarrison(const CGTownInstance * t, int currentWeek) const;
  38. public:
  39. NewTurnProcessor(CGameHandler * gameHandler);
  40. void onNewTurn();
  41. void onPlayerTurnStarted(PlayerColor color);
  42. void onPlayerTurnEnded(PlayerColor color);
  43. };