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

Function drawStats

bwapi/ExampleAIClient/Source/ExampleAIClient.cpp:216–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216void drawStats()
217{
218 int line = 0;
219 Broodwar->drawTextScreen(5, 0, "I have %d units:", Broodwar->self()->allUnitCount() );
220 for (auto& unitType : UnitTypes::allUnitTypes())
221 {
222 int count = Broodwar->self()->allUnitCount(unitType);
223 if ( count )
224 {
225 Broodwar->drawTextScreen(5, 16*line, "- %d %s%c", count, unitType.c_str(), count == 1 ? ' ' : 's');
226 ++line;
227 }
228 }
229}
230
231void drawBullets()
232{

Callers 1

mainFunction · 0.85

Calls 4

drawTextScreenMethod · 0.80
allUnitCountMethod · 0.80
c_strMethod · 0.80
selfMethod · 0.45

Tested by

no test coverage detected