mirror of
https://github.com/vcmi/vcmi.git
synced 2026-05-22 09:55:17 +02:00
Reduced usage of global variables - removed or made const / constexpr
This commit is contained in:
@@ -49,7 +49,6 @@ CBattleAI::~CBattleAI()
|
||||
|
||||
void CBattleAI::initBattleInterface(std::shared_ptr<Environment> ENV, std::shared_ptr<CBattleCallback> CB)
|
||||
{
|
||||
setCbc(CB);
|
||||
env = ENV;
|
||||
cb = CB;
|
||||
playerID = *CB->getPlayerID();
|
||||
@@ -121,7 +120,6 @@ void CBattleAI::activeStack(const BattleID & battleID, const CStack * stack )
|
||||
};
|
||||
|
||||
BattleAction result = BattleAction::makeDefend(stack);
|
||||
setCbc(cb); //TODO: make solid sure that AIs always use their callbacks (need to take care of event handlers too)
|
||||
|
||||
auto start = std::chrono::high_resolution_clock::now();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user