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

Method getSpaceRemaining

bwapi/BWAPILIB/Source/Unit.cpp:352–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350 }
351
352 int UnitInterface::getSpaceRemaining() const
353 {
354 int space = this->getType().spaceProvided();
355
356 // Decrease the space for each loaded unit
357 for (auto &u : getLoadedUnits())
358 space -= u->getType().spaceRequired();
359
360 return std::max(space, 0);
361 }
362 //--------------------------------------------- ATTACK MOVE ------------------------------------------------
363 bool UnitInterface::attack(Position target, bool shiftQueueCommand)
364 {

Callers 1

Filters.cppFile · 0.80

Calls 3

spaceProvidedMethod · 0.80
spaceRequiredMethod · 0.80
getTypeMethod · 0.45

Tested by

no test coverage detected