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

Method stormIdToPlayerId

bwapi/BWAPI/Source/BWAPI/GameInternals.cpp:135–144  ·  view source on GitHub ↗

------------------------------------------- PLAYER ID CONVERT --------------------------------------------

Source from the content-addressed store, hash-verified

133 }
134 //------------------------------------------- PLAYER ID CONVERT --------------------------------------------
135 int GameImpl::stormIdToPlayerId(int dwStormId)
136 {
137 /* Translates a storm ID to a player Index */
138 for (int i = 0; i < BW::PLAYER_COUNT; ++i)
139 {
140 if ( BW::BWDATA::Players[i].dwStormId == dwStormId )
141 return i;
142 }
143 return -1;
144 }
145 //----------------------------------------------- PARSE TEXT -----------------------------------------------
146 bool GameImpl::parseText(const std::string &text)
147 {

Callers 1

dropPlayersMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected