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

Method hasPath

bwapi/BWAPILIB/Source/Game.cpp:731–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

729 return this->getRegionAt(position.x, position.y);
730 }
731 bool Game::hasPath(Position source, Position destination) const
732 {
733 if (source.isValid() && destination.isValid())
734 {
735 Region rgnA = getRegionAt(source);
736 Region rgnB = getRegionAt(destination);
737 if (rgnA && rgnB && rgnA->getRegionGroupID() == rgnB->getRegionGroupID())
738 return this->setLastError();
739 }
740 return this->setLastError(Errors::Unreachable_Location);
741 }
742 //------------------------------------------ DRAW TEXT ----------------------------------------------
743 void Game::drawText(CoordinateType::Enum ctype, int x, int y, const char *format, ...)
744 {

Callers 7

canBuildHereFunction · 0.45
canGatherFunction · 0.45
canLoadFunction · 0.45
canUseTechUnitFunction · 0.45
canUseTechPositionFunction · 0.45
executeMethod · 0.45
RemoveDisconnectedFunction · 0.45

Calls 4

getRegionAtFunction · 0.85
getRegionGroupIDMethod · 0.80
setLastErrorMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected