#pragma once

#include "Common.h"

#include "UnitData.h"
#include "BuildOrderQueue.h"
#include "InformationManager.h"
#include "WorkerManager.h"
#include "BuildManager.h"
#include "ConstructionManager.h"
#include "ScoutManager.h"
#include "StrategyManager.h"

namespace MyBot
{
	class Strategy_BuildTaskManager {
		Strategy_BuildTaskManager();
	public:
		/// static singleton 객체를 리턴합니다
		static Strategy_BuildTaskManager &	Instance();

		void update();

		void executeConstructionTask();
		void executeUnitBuildTask();

		/// 건물이 하나도 안지어져있으면 하나를 짓고, Tech / Upgrade 가 하나도 안되어있으면 수행한다
		void checkBuildPreconditionAndBuildOne(StrategicTask task, MetaType metaType);

		/// 건물이나 유닛을 limitCount 까지 여러개 짓는다
		void BuildUnitByLimit(StrategicTask task, MetaType metaType, int limitCount);

		/// 일꾼 생산
		bool isAutoWorkerTrainingMode;
		void executeWorkerTraining();

		/// 서플라이 생산
		bool isAutoSupplyManagementMode;
		void executeSupplyManagement();


	};
}