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

Method hasPower

bwapi/BWAPILIB/Source/Game.cpp:642–647  ·  view source on GitHub ↗

--------------------------------------------- HAS POWER --------------------------------------------------

Source from the content-addressed store, hash-verified

640 };
641 //--------------------------------------------- HAS POWER --------------------------------------------------
642 bool Game::hasPower(int tileX, int tileY, UnitType unitType) const
643 {
644 if ( unitType.isValid() && unitType < UnitTypes::None )
645 return hasPowerPrecise( tileX*32 + unitType.tileWidth()*16, tileY*32 + unitType.tileHeight()*16, unitType);
646 return hasPowerPrecise( tileX*32, tileY*32, UnitTypes::None);
647 }
648 bool Game::hasPower(TilePosition position, UnitType unitType) const
649 {
650 return hasPower(position.x, position.y, unitType);

Callers 2

canBuildHereFunction · 0.80
onStartMethod · 0.80

Calls 4

hasPowerFunction · 0.85
tileWidthMethod · 0.80
tileHeightMethod · 0.80
isValidMethod · 0.45

Tested by 1

onStartMethod · 0.64