-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProductionManager.h
More file actions
46 lines (27 loc) · 1.08 KB
/
ProductionManager.h
File metadata and controls
46 lines (27 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once
#ifndef PRODUCTION_MANAGER_H
#define PRODUCTION_MANAGER_H
#include <sc2api/sc2_api.h>
#include <iostream>
#include <vector>
#include "sc2utils/sc2_manage_process.h"
class Bot;
using namespace sc2;
class ProductionManager {
private:
int current_infantery_armor_level = 0;
int current_infantery_weapon_level = 0;
std::vector<const Unit*> idle_buildings_;
void DetermineProductionForIdleBuildings(Bot* bot);
bool DetermineProductionForCommandCenter(Bot* bot, const Unit* command_center_idle);
bool DetermineProductionForBarracks(Bot* bot, const Unit* barracks_idle);
bool DetermineProductionForEngineeringBay(Bot* bot, const Unit* barracks_idle);
bool UnitCanBeConstructed(const ObservationInterface* observation, const int mineral_cost_of_unit, const int vespene_cost_of_unit, const int space_taken_by_unit);
bool GetIfNeedATechLab(Bot *bot, const Unit* barrack_idle);
bool GetIfHasATechLab(Bot *bot, const Unit* barrack_idle);
public:
ProductionManager();
void Update(Bot* bot);
void OnUnitIdle(Bot* bot, const Unit* buidling_idle);
};
#endif //!PRODUCTION_MANAGER_H