12 #include <torchcraft/state.h> 28 bool isWalkable(
int walkX,
int walkY)
const override;
30 bool isBuildable(
int tileX,
int tileY,
bool includeBuildings =
false)
36 BWAPI::Unit
getUnit(
int unitID)
const override;
39 void throwNotImplemented()
const;
43 BWAPI::Unitset staticNeutralUnits_;
44 BWAPI::TilePosition::list startLocations_;
49 #if defined(__clang__) 50 #pragma clang diagnostic push 51 #pragma clang diagnostic ignored "-Wreturn-type" 52 #elif defined(__GNUC__) 53 #pragma GCC diagnostic push 54 #pragma GCC diagnostic ignored "-Wreturn-type" 58 throwNotImplemented();
61 throwNotImplemented();
64 throwNotImplemented();
67 throwNotImplemented();
70 throwNotImplemented();
73 throwNotImplemented();
76 throwNotImplemented();
79 throwNotImplemented();
82 throwNotImplemented();
85 throwNotImplemented();
87 const std::list<BWAPI::Event>&
getEvents()
const override {
88 throwNotImplemented();
90 BWAPI::Force
getForce(
int forceID)
const override {
91 throwNotImplemented();
93 BWAPI::Player
getPlayer(
int playerID)
const override {
94 throwNotImplemented();
97 throwNotImplemented();
99 BWAPI::Region
getRegion(
int regionID)
const override {
100 throwNotImplemented();
103 throwNotImplemented();
106 throwNotImplemented();
109 throwNotImplemented();
112 throwNotImplemented();
116 throwNotImplemented();
119 throwNotImplemented();
122 throwNotImplemented();
125 throwNotImplemented();
128 throwNotImplemented();
131 throwNotImplemented();
134 throwNotImplemented();
137 throwNotImplemented();
140 throwNotImplemented();
143 throwNotImplemented();
150 const BWAPI::UnitFilter& pred =
nullptr)
const override {
151 throwNotImplemented();
154 BWAPI::Position center,
155 const BWAPI::UnitFilter& pred =
nullptr,
159 int bottom = 999999)
const override {
160 throwNotImplemented();
163 const BWAPI::BestUnitFilter& best,
164 const BWAPI::UnitFilter& pred,
165 BWAPI::Position center = BWAPI::Positions::Origin,
166 int radius = 999999)
const override {
167 throwNotImplemented();
170 throwNotImplemented();
172 bool setLastError(BWAPI::Error e = BWAPI::Errors::None)
const override {
173 throwNotImplemented();
176 throwNotImplemented();
179 throwNotImplemented();
182 throwNotImplemented();
185 throwNotImplemented();
188 throwNotImplemented();
191 throwNotImplemented();
193 bool hasCreep(
int tileX,
int tileY)
const override {
194 throwNotImplemented();
199 BWAPI::UnitType unitType = BWAPI::UnitTypes::None)
const override {
200 throwNotImplemented();
203 BWAPI::TilePosition position,
204 BWAPI::UnitType type,
205 BWAPI::Unit builder =
nullptr,
206 bool checkExplored =
false)
override {
207 throwNotImplemented();
209 bool canMake(BWAPI::UnitType type, BWAPI::Unit builder =
nullptr)
211 throwNotImplemented();
214 BWAPI::TechType type,
215 BWAPI::Unit unit =
nullptr,
216 bool checkCanIssueCommandType =
true)
override {
217 throwNotImplemented();
220 BWAPI::UpgradeType type,
221 BWAPI::Unit unit =
nullptr,
222 bool checkCanIssueCommandType =
true)
override {
223 throwNotImplemented();
225 void vPrintf(
const char* format, va_list args)
override {
226 throwNotImplemented();
228 void vSendTextEx(
bool toAllies,
const char* format, va_list args)
override {
229 throwNotImplemented();
232 throwNotImplemented();
235 throwNotImplemented();
238 throwNotImplemented();
241 throwNotImplemented();
244 throwNotImplemented();
247 throwNotImplemented();
250 throwNotImplemented();
253 throwNotImplemented();
256 throwNotImplemented();
259 throwNotImplemented();
261 bool issueCommand(
const BWAPI::Unitset& units, BWAPI::UnitCommand command)
263 throwNotImplemented();
266 throwNotImplemented();
268 BWAPI::Player
self()
const override {
269 throwNotImplemented();
271 BWAPI::Player
enemy()
const override {
272 throwNotImplemented();
275 throwNotImplemented();
278 throwNotImplemented();
281 throwNotImplemented();
284 throwNotImplemented();
287 BWAPI::Text::Size::Enum size = BWAPI::Text::Size::Default)
override {
288 throwNotImplemented();
291 BWAPI::CoordinateType::Enum ctype,
295 va_list arg)
override {
296 throwNotImplemented();
299 BWAPI::CoordinateType::Enum ctype,
305 bool isSolid =
false)
override {
306 throwNotImplemented();
309 BWAPI::CoordinateType::Enum ctype,
317 bool isSolid =
false)
override {
318 throwNotImplemented();
321 BWAPI::CoordinateType::Enum ctype,
326 bool isSolid =
false)
override {
327 throwNotImplemented();
330 BWAPI::CoordinateType::Enum ctype,
336 bool isSolid =
false)
override {
337 throwNotImplemented();
340 BWAPI::CoordinateType::Enum ctype,
343 BWAPI::Color color)
override {
344 throwNotImplemented();
347 BWAPI::CoordinateType::Enum ctype,
352 BWAPI::Color color)
override {
353 throwNotImplemented();
356 throwNotImplemented();
359 throwNotImplemented();
362 throwNotImplemented();
365 throwNotImplemented();
368 throwNotImplemented();
371 throwNotImplemented();
374 throwNotImplemented();
377 throwNotImplemented();
380 throwNotImplemented();
383 throwNotImplemented();
386 throwNotImplemented();
389 throwNotImplemented();
391 int getAPM(
bool includeSelects =
false)
const override {
392 throwNotImplemented();
395 throwNotImplemented();
398 throwNotImplemented();
401 BWAPI::Player player,
403 bool alliedVictory =
true)
override {
404 throwNotImplemented();
406 bool setVision(BWAPI::Player player,
bool enabled =
true)
override {
407 throwNotImplemented();
410 throwNotImplemented();
413 throwNotImplemented();
416 throwNotImplemented();
419 throwNotImplemented();
422 throwNotImplemented();
425 throwNotImplemented();
428 throwNotImplemented();
431 throwNotImplemented();
433 #if defined(__clang__) 434 #pragma clang diagnostic pop 435 #elif defined(__GNUC__) 436 #pragma GCC diagnostic pop BWAPI::GameType getGameType() const override
Definition: tcgame.h:102
void setCommandOptimizationLevel(int level) override
Definition: tcgame.h:412
const std::list< BWAPI::Event > & getEvents() const override
Definition: tcgame.h:87
bool isExplored(int tileX, int tileY) const override
Definition: tcgame.h:190
int getGroundHeight(int tileX, int tileY) const override
Definition: tcgame.cpp:41
int getAPM(bool includeSelects=false) const override
Definition: tcgame.h:391
bool getMouseState(BWAPI::MouseButton button) const override
Definition: tcgame.h:124
int getRemainingLatencyFrames() const override
Definition: tcgame.h:361
bool isBuildable(int tileX, int tileY, bool includeBuildings=false) const override
Definition: tcgame.cpp:52
BWAPI::Playerset & observers() override
Definition: tcgame.h:283
double getAverageFPS() const override
Definition: tcgame.h:118
bool canMake(BWAPI::UnitType type, BWAPI::Unit builder=nullptr) const override
Definition: tcgame.h:209
void resumeGame() override
Definition: tcgame.h:249
BWAPI::Unit getClosestUnitInRectangle(BWAPI::Position center, const BWAPI::UnitFilter &pred=nullptr, int left=0, int top=0, int right=999999, int bottom=999999) const override
Definition: tcgame.h:153
void pingMinimap(int x, int y) override
Definition: tcgame.h:136
std::string mapFileName() const override
Definition: tcgame.h:175
bool canUpgrade(BWAPI::UpgradeType type, BWAPI::Unit unit=nullptr, bool checkCanIssueCommandType=true) override
Definition: tcgame.h:219
BWAPI::Position getScreenPosition() const override
Definition: tcgame.h:130
BWAPI::TilePosition::list const & getStartLocations() const override
Definition: tcgame.cpp:69
bool isGUIEnabled() const override
Definition: tcgame.h:382
int mapHeight() const override
Definition: tcgame.cpp:77
void vDrawText(BWAPI::CoordinateType::Enum ctype, int x, int y, const char *format, va_list arg) override
Definition: tcgame.h:290
void drawBox(BWAPI::CoordinateType::Enum ctype, int left, int top, int right, int bottom, BWAPI::Color color, bool isSolid=false) override
Definition: tcgame.h:298
void enableFlag(int flag) override
Definition: tcgame.h:142
void drawCircle(BWAPI::CoordinateType::Enum ctype, int x, int y, int radius, BWAPI::Color color, bool isSolid=false) override
Definition: tcgame.h:320
int getReplayFrameCount() const override
Definition: tcgame.h:111
void setLatCom(bool isEnabled) override
Definition: tcgame.h:379
const BWAPI::Playerset & getPlayers() const override
Definition: tcgame.h:60
void setLocalSpeed(int speed) override
Definition: tcgame.h:258
bool isLatComEnabled() const override
Definition: tcgame.h:376
BWAPI::Playerset & enemies() override
Definition: tcgame.h:280
BWAPI::Player enemy() const override
Definition: tcgame.h:271
bool isMultiplayer() const override
Definition: tcgame.h:234
BWAPI::Position getMousePosition() const override
Definition: tcgame.h:121
BWAPI::Unit getBestUnit(const BWAPI::BestUnitFilter &best, const BWAPI::UnitFilter &pred, BWAPI::Position center=BWAPI::Positions::Origin, int radius=999999) const override
Definition: tcgame.h:162
void setTextSize(BWAPI::Text::Size::Enum size=BWAPI::Text::Size::Default) override
Definition: tcgame.h:286
bool isFlagEnabled(int flag) const override
Definition: tcgame.h:139
bool issueCommand(const BWAPI::Unitset &units, BWAPI::UnitCommand command) override
Definition: tcgame.h:261
bool canBuildHere(BWAPI::TilePosition position, BWAPI::UnitType type, BWAPI::Unit builder=nullptr, bool checkExplored=false) override
Definition: tcgame.h:202
void restartGame() override
Definition: tcgame.h:255
int getRevision() const override
Definition: tcgame.h:367
BWAPI::Error getLastError() const override
Definition: tcgame.h:169
void setScreenPosition(int x, int y) override
Definition: tcgame.h:133
BWAPI::Force getForce(int forceID) const override
Definition: tcgame.h:90
bool hasPowerPrecise(int x, int y, BWAPI::UnitType unitType=BWAPI::UnitTypes::None) const override
Definition: tcgame.h:196
std::string mapName() const override
Definition: tcgame.h:181
BWAPI::Region getRegion(int regionID) const override
Definition: tcgame.h:99
int getClientVersion() const override
Definition: tcgame.h:370
std::string mapPathName() const override
Definition: tcgame.h:178
const BWAPI::Position::list & getNukeDots() const override
Definition: tcgame.h:84
const BWAPI::Unitset & getSelectedUnits() const override
Definition: tcgame.h:265
void setGUI(bool enabled) override
Definition: tcgame.h:385
void leaveGame() override
Definition: tcgame.h:252
int getLatency() const override
Definition: tcgame.h:105
BWAPI::Region getRegionAt(int x, int y) const override
Definition: tcgame.h:421
const BWAPI::Unitset & getGeysers() const override
Definition: tcgame.h:69
const BWAPI::Unitset & getAllUnits() const override
Definition: tcgame.h:63
BWAPI::Playerset & allies() override
Definition: tcgame.h:277
BWAPI::Player neutral() const override
Definition: tcgame.h:274
bool isDebug() const override
Definition: tcgame.h:373
void drawEllipse(BWAPI::CoordinateType::Enum ctype, int x, int y, int xrad, int yrad, BWAPI::Color color, bool isSolid=false) override
Definition: tcgame.h:329
Definition: buildtype.h:15
const BWAPI::Unitset & getMinerals() const override
Definition: tcgame.h:66
const BWAPI::Unitset & getStaticMinerals() const override
Definition: tcgame.h:75
TCGame()
Definition: tcgame.h:19
bool isVisible(int tileX, int tileY) const override
Definition: tcgame.h:187
bool setVision(BWAPI::Player player, bool enabled=true) override
Definition: tcgame.h:406
void drawDot(BWAPI::CoordinateType::Enum ctype, int x, int y, BWAPI::Color color) override
Definition: tcgame.h:339
BWAPI::Player getPlayer(int playerID) const override
Definition: tcgame.h:93
const BWAPI::Unitset & getStaticGeysers() const override
Definition: tcgame.h:78
void vSendTextEx(bool toAllies, const char *format, va_list args) override
Definition: tcgame.h:228
bool setMap(const char *mapFileName) override
Definition: tcgame.h:394
void drawTriangle(BWAPI::CoordinateType::Enum ctype, int ax, int ay, int bx, int by, int cx, int cy, BWAPI::Color color, bool isSolid=false) override
Definition: tcgame.h:308
int getRemainingLatencyTime() const override
Definition: tcgame.h:364
int getFPS() const override
static int bestFPS override { throwNotImplemented(); }
Definition: tcgame.h:115
bool isReplay() const override
Definition: tcgame.h:243
void vPrintf(const char *format, va_list args) override
Definition: tcgame.h:225
int mapWidth() const override
Definition: tcgame.cpp:73
bool setLastError(BWAPI::Error e=BWAPI::Errors::None) const override
Definition: tcgame.h:172
int elapsedTime() const override
Definition: tcgame.h:409
BWAPI::Unit getUnit(int unitID) const override
Definition: tcgame.cpp:81
int getLatencyFrames() const override
Definition: tcgame.h:355
void drawLine(BWAPI::CoordinateType::Enum ctype, int x1, int y1, int x2, int y2, BWAPI::Color color) override
Definition: tcgame.h:346
void setFrameSkip(int frameSkip) override
Definition: tcgame.h:397
const BWAPI::Unitset & getNeutralUnits() const override
Definition: tcgame.h:72
BWAPI::Unitset getUnitsInRectangle(int left, int top, int right, int bottom, const BWAPI::UnitFilter &pred=nullptr) const override
Definition: tcgame.h:145
BWAPI::Unit indexToUnit(int unitIndex) const override
Definition: tcgame.h:96
bool isPaused() const override
Definition: tcgame.h:240
bool setRevealAll(bool reveal=true) override
Definition: tcgame.h:427
int getLastEventTime() const override
Definition: tcgame.h:424
void setState(torchcraft::State *s)
Definition: tcgame.cpp:16
const BWAPI::Forceset & getForces() const override
Definition: tcgame.h:57
int getFrameCount() const override
Definition: tcgame.h:108
int getInstanceNumber() const override
Definition: tcgame.h:388
bool getKeyState(BWAPI::Key key) const override
Definition: tcgame.h:127
const BWAPI::Regionset & getAllRegions() const override
Definition: tcgame.h:418
bool setAlliance(BWAPI::Player player, bool allied=true, bool alliedVictory=true) override
Definition: tcgame.h:400
bool hasCreep(int tileX, int tileY) const override
Definition: tcgame.h:193
void pauseGame() override
Definition: tcgame.h:246
bool isWalkable(int walkX, int walkY) const override
Definition: tcgame.cpp:32
bool canResearch(BWAPI::TechType type, BWAPI::Unit unit=nullptr, bool checkCanIssueCommandType=true) override
Definition: tcgame.h:213
int countdownTimer() const override
Definition: tcgame.h:415
bool isBattleNet() const override
Definition: tcgame.h:237
BWAPI::Unitset const & getStaticNeutralUnits() const override
Definition: tcgame.cpp:65
bool isInGame() const override
Definition: tcgame.h:231
std::string mapHash() const override
Definition: tcgame.h:184
virtual ~TCGame()
Definition: tcgame.cpp:26
const BWAPI::Bulletset & getBullets() const override
Definition: tcgame.h:81
int getLatencyTime() const override
Definition: tcgame.h:358
unsigned getRandomSeed() const override
Definition: tcgame.h:430