Returns the Cells collection object.
The Cells collection object can be used to manipulate all Cell objects through the use of its properties and methods.
The Item method is the default property for the Cells object.
The following example creates a checkered board pattern using the Cell object and the Cells collection object.
Private Sub World1_OnSimBegin(ByVal World As World, ByVal Worms As Bots, ByVal Cells As Cells)
Cells.Color = vbtBlack
For Each Cell in Cells
If IsEven(Cell.RowIndex + Cell.ColumnIndex) then
Cell.Color = vbtRed
End If
Next Cell
End Sub
Function IsEven(ByVal Number as Long) as Boolean
If Number Mod 2 = 0 Then IsEven = true Else IsEven = false
End Function