Adds optional optimization to history helper functions to limit the max amount of turns searched through.
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2021-10-24 11:10:30 +02:00
parent 7354c835e6
commit 47c3429295
2 changed files with 19 additions and 8 deletions

View File

@@ -26,7 +26,7 @@ namespace CreatureLib::Battling {
bool _hasEnded = false;
BattleResult _battleResult = BattleResult::Empty();
EventHook _eventHook;
ArbUt::UniquePtr<HistoryHolder> _historyHolder = new HistoryHolder();
ArbUt::UniquePtr<HistoryHolder> _historyHolder = new HistoryHolder([this]() { return GetCurrentTurn(); });
uint32_t _currentTurn = 0;