package Group import NoWurst import Vectors import public TempGroups public function group.enumUnitsInRange(vec2 pos, real range) GroupEnumUnitsInRange(this, pos.x, pos.y, range, null) public function group.enumUnitsInRange(vec2 pos, real range, boolexpr filter) GroupEnumUnitsInRange(this, pos.x, pos.y, range, filter) public function group.clear() GroupClear(this) public function group.addUnit(unit u) GroupAddUnit(this, u) public function group.removeUnit(unit u) GroupRemoveUnit(this, u) public function group.destr() DestroyGroup(this) public function group.contains(unit u) returns boolean return IsUnitInGroup(u, this) // group iterators public function group.iterator() returns group // return a copy of the group: bj_groupAddGroupDest = CreateGroup() ForGroup(this, function GroupAddGroupEnum) return bj_groupAddGroupDest public function group.hasNext() returns boolean return FirstOfGroup(this) != null public function group.next() returns unit let u = FirstOfGroup(this) GroupRemoveUnit(this, u) return u public function group.close() DestroyGroup(this)