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

Method isAlly

bwapi/BWAPI/Source/BWAPI/PlayerImpl.cpp:70–75  ·  view source on GitHub ↗

--------------------------------------------- IS ALLIES WITH ---------------------------------------------

Source from the content-addressed store, hash-verified

68 }
69 //--------------------------------------------- IS ALLIES WITH ---------------------------------------------
70 bool PlayerImpl::isAlly(const Player player) const
71 {
72 if ( !player || this->isNeutral() || player->isNeutral() || this->isObserver() || player->isObserver() )
73 return false;
74 return BW::BWDATA::Game.playerAlliances[index][ static_cast<PlayerImpl*>(player)->getIndex() ] != 0;
75 }
76 //--------------------------------------------- IS ALLIES WITH ---------------------------------------------
77 bool PlayerImpl::isEnemy(const Player player) const
78 {

Callers 7

updateMethod · 0.45
onGameStartMethod · 0.45
vSendTextExMethod · 0.45
onMatchStartMethod · 0.45
IsAllyImplFunction · 0.45
onStartMethod · 0.45
startMethod · 0.45

Calls 3

isNeutralMethod · 0.95
isObserverMethod · 0.95
getIndexMethod · 0.45

Tested by 2

onStartMethod · 0.36
startMethod · 0.36