Hey, I'm building a bot for the competition and am working on code that handles unit training.
My question is: will the result of the unit->train(type) command always be available the same frame it was issued, or could it be later under (high) latency?
Here's a code that might illustrate my problem:
CODE
int myMinerals = Broodwar->self()->minerals();
BWAPI::Unit* unit = getCommandCenter();
BWAPI::UnitType type = UnitTypes::Terran_SCV;
bool success = unit->train(type);
assert(success == unit->isTraining());
if(success) myMinerals -= unit->mineralPrice();
assert(myMinerals == Broodwar->self()->minerals());
It seems to work on my system, but my code has only played locally against the cpu.