Random() As Boolean
   
   ' determine the index to write into
   Dim iNextIndex As Long
   If (m_iIndex = 1) Then
      iNextIndex = 0
   Else
      iNextIndex = 1
   End If
   
   ' Calculate the automata
   Dim i As Long
   Dim iPrev As Long
   Dim iNext As Long
   iPrev = m_lSize - 1
   For i = 0 To m_lSize - 1
      iNext = (i + 1) Mod m_lSize
      If (m_cells(m_iIndex, iPrev) = 0) Then
         ' output is white if me or next is black:
         If (m_cells(m_iIndex, i) = 0) Or (m_cells(m_iIndex, iNex