In addition to being able to program VisualBots objects individually, you can more easily and efficiently manipulate them as collections of objects. The following four object collections are available:
Working with the Bots Collection
Working with the Cells Collection
Working with the Group Collection
The Group collection object is a subset of the Bots collection. The collection object shares many of the properties and methods of an individual Bot object, plus functionality to extract population information and to facilitate group to group manipulation (for example set intersection and union). A Group object can be created in several different ways. For example, the GroupNear method returns a Group object consisting of nearby Bot objects. Bot objects can be added or subtracted from a Group. You add a Bot object to a Group using the Add method and remove a Bot using the Remove method. Individual Bot objects are accessed using the Item method.
Working with the Region Collection
Working with the Tags Collection
Groups and Regions as Ordered Lists
Group and Region objects have methods to manage member object order within each collection. For example, the Shuffle method randomly rearranges the order of objects, the RandomSelect method randomly selects and returns an object, Insert inserts an object before a specified position, the Swap method interchanges the position of two member objects, and the ShiftIndex method shifts the position of all member objects.
Groups and Regions objects have methods to perform set arithmetic such as Union, Intersect, and Subtract. Information functions such as IsMember, IsNullSet, and IsSubset can be used to compare and analyze the contents of collections.