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

Method getPlayerID

bwapi/BWAPI/Source/BWAPI/Server.cpp:701–711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

699 return forceVector[id];
700 }
701 int Server::getPlayerID(Player player)
702 {
703 if ( !player )
704 return -1;
705 if (playerLookup.find(player) == playerLookup.end())
706 {
707 playerLookup[player] = (int)(playerVector.size());
708 playerVector.push_back(player);
709 }
710 return playerLookup[player];
711 }
712 Player Server::getPlayer(int id) const
713 {
714 if (playerVector.size() <= static_cast<unsigned>(id))

Callers 3

onGameStartMethod · 0.80
updateInternalDataMethod · 0.80
updateDataMethod · 0.80

Calls 2

endMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected