     console.log "####   #{i}. #{normalizedRle part}"
     #now analyze this part
     res = analyzeFragment rule, part, time
-    console.log "####        #{JSON.stringify res}"
 
     
 

console.log "#### dp:  #{JSON.stringify determinePeriod rule, pattern1, 0}"

#1-cell
pattern2 = Cells.from_rle "oo"
v2 = patternDelta determinePeriod rule, pattern2, 0

library = new Library rule

console.log "Two velocities: #{v1}, #{v2}"
[freeIndex, freeOrt] = opposingOrt v1, v2

    #wait for the cycle  
    result = {cycle: false}
    patternEvolution rule, pattern, time, (curPattern, t) ->
      dt = t-time
      if dt is 0 then return true
      Cells.sortXY curPattern
      eq = Cells.shiftEqual pattern, curPattern, mod2 dt
      if eq
        result.cycle = true
