forked from Plankton555/SSCAIT-ObserverModule
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExampleAIModule.h
36 lines (33 loc) · 1.2 KB
/
ExampleAIModule.h
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
#pragma once
#include <BWAPI.h>
#include "CameraModule.h"
// Remember not to use "Broodwar" in any global class constructor!
class ExampleAIModule : public BWAPI::AIModule
{
public:
// Virtual functions for callbacks, leave these as they are.
virtual void onStart();
virtual void onEnd(bool isWinner);
virtual void onFrame();
virtual void onSendText(std::string text);
virtual void onReceiveText(BWAPI::Player player, std::string text);
virtual void onPlayerLeft(BWAPI::Player player);
virtual void onNukeDetect(BWAPI::Position target);
virtual void onUnitDiscover(BWAPI::Unit unit);
virtual void onUnitEvade(BWAPI::Unit unit);
virtual void onUnitShow(BWAPI::Unit unit);
virtual void onUnitHide(BWAPI::Unit unit);
virtual void onUnitCreate(BWAPI::Unit unit);
virtual void onUnitDestroy(BWAPI::Unit unit);
virtual void onUnitMorph(BWAPI::Unit unit);
virtual void onUnitRenegade(BWAPI::Unit unit);
virtual void onSaveGame(std::string gameName);
virtual void onUnitComplete(BWAPI::Unit unit);
// Everything below this line is safe to modify.
private:
CameraModule cameraModule;
int screen_width;
int screen_height;
void renderPlayerInfos();
void renderBuildQueues();
};