 #!/usr/bin/env coffee
 fs = require "fs"
 {Cells, evaluateCellList, getDualTransform, splitPattern} = require "./cells"
-{parse} = require "./rules"
+{parse, NamedRules} = require "./rules"
 stdio = require "stdio"
 {mod, div} = require "./math_util"
 {Array2d, MargolusNeighborehoodField} = require "./reversible_ca"


  seedPercent = if opts['seed-percent']? then parseInt(opts['seed-percent'], 10)*0.01 else 0.5

  rule = parse opts.rule
  maxSteps = if opts["max-steps"]? then parseInt(opts["max-steps"],10) else 3000
  console.log "Width: #{width},height: #{height}"
  console.log "Seed size: #{seedWidth} x #{seedHeight}"

    process.stderr.write "Output file not specified\n"
    process.exit 1
  outputPath = opts.args[0]

  #Now extract the values
  [width, height] = parseSizePair opts.size, [256, 256]
  [seedWidth, seedHeight] = parseSizePair opts['seed-size'], [width>>1, height>>1]
