Similar to orderDroidObj() but for a group of droids
Code
function orderGroupObj(group,dorder,obj) {
enumGroup(group).forEach(function(droid) {
if (droid.type==DROID) orderDroidObj(droid,dorder,obj);
});
}
Example
// when attacked, tell all droids in a "retalliationGroup" to attack the attacker
eventAttacked = function(victim,attacker) {
orderGroupObj(retalliationGroup, DORDER_ATTACK, attacker);
}