MCPcopy Create free account
hub / github.com/bwapi/bwapi / getRegionAt

Method getRegionAt

bwapi/BWAPI/Source/BWAPI/GameImpl.cpp:875–890  ·  view source on GitHub ↗

------------------------------------------------- GET REGION AT ------------------------------------------

Source from the content-addressed store, hash-verified

873 }
874 //------------------------------------------------- GET REGION AT ------------------------------------------
875 BWAPI::Region GameImpl::getRegionAt(int x, int y) const
876 {
877 this->setLastError();
878 if ( !Position(x, y) )
879 {
880 this->setLastError(BWAPI::Errors::Invalid_Parameter);
881 return nullptr;
882 }
883 const BW::region * const rgn = BW::getRegionAt(x,y);
884 if ( !rgn )
885 {
886 this->setLastError(BWAPI::Errors::Invalid_Parameter);
887 return nullptr;
888 }
889 return getRegion(rgn->getIndex());
890 }
891 int GameImpl::getLastEventTime() const
892 {
893 return this->lastEventTime;

Callers

nothing calls this directly

Calls 4

setLastErrorMethod · 0.95
getRegionAtFunction · 0.85
PositionClass · 0.50
getIndexMethod · 0.45

Tested by

no test coverage detected