示例#1
0
void SquadData::assignUnitToSquad(BWAPI::Unit unit, Squad & squad)
{
    UAB_ASSERT_WARNING(canAssignUnitToSquad(unit, squad), "We shouldn't be re-assigning this unit!");

    Squad * previousSquad = getUnitSquad(unit);

    if (previousSquad)
    {
        previousSquad->removeUnit(unit);
    }

    squad.addUnit(unit);
}
void DefenseOfTheCodeGame::popluateSquad(Squad & squad, vector<string> squadUnits) {
	for (int i=0; i<squadUnits.size(); i++) {
		squad.addUnit( squadUnits.at(i));
	}
}