src/GameCommander.cpp
void GameCommander::setValidUnits()
{
    // make sure the unit is completed and alive and usable
    //for (auto & unit : m_bot.UnitInfo().getUnits(Players::Self))
	for (auto & mapUnit : m_bot.GetAllyUnits())
    {
		auto &unit = mapUnit.second;
		if (!unit.isValid())
			continue;
		if (!unit.isCompleted())
			continue;
		if (!unit.isAlive())
			continue;
        m_validUnits.push_back(unit);
    }
}
// validates units as usable for distribution to various managers
validates units as usable for distribution to various managers
validates units as usable for distribution to various managers
void GameCommander::setValidUnits()
{
	for (auto & mapUnit : m_bot.GetAllyUnits())
    {
		auto &unit = mapUnit.second;
		if (!unit.isValid())
			continue;
		if (!unit.isCompleted())
			continue;
		if (!unit.isAlive())
			continue;
        m_validUnits.push_back(unit);
    }
}
void GameCommander :: setValidUnits ( ) { for ( auto & mapUnit : m_bot . GetAllyUnits ( ) ) { auto & unit = mapUnit . second ; if ( ! unit . isValid ( ) ) continue ; if ( ! unit . isCompleted ( ) ) continue ; if ( ! unit . isAlive ( ) ) continue ; m_validUnits . push_back ( unit ) ; } }
validates units as usable for distribution to various managers
validates units as usable for distribution to various managers
// make sure the unit is completed and alive and usable //for (auto & unit : m_bot.UnitInfo().getUnits(Players::Self))