initialize :: Args -> IO ()
initialize (Args seedFile interval singleRun) = do
  (area, cells) <- readSeedContent <$> readFile seedFile
  prepareScreen
  printC area cells
  unless singleRun $ loop area cells
  where
    loop area cells = do
      hFlush stdout
      threadDelay $ interval * 1000
      let nextCells = mutate area cells
      printD area $ difference cells nextCells
      loop area nextCells
initialize :: Args -> IO ()
initialize (Args seedFile interval singleRun) = do
  (area, cells) <- readSeedContent <$> readFile seedFile
  prepareScreen
  printC area cells
  unless singleRun $ loop area cells
  where
    loop area cells = do
      hFlush stdout
      threadDelay $ interval * 1000
      let nextCells = mutate area cells
      printD area $ difference cells nextCells
      loop area nextCells
initialize (Args seedFile interval singleRun) = do
  (area, cells) <- readSeedContent <$> readFile seedFile
  prepareScreen
  printC area cells
  unless singleRun $ loop area cells
  where
    loop area cells = do
      hFlush stdout
      threadDelay $ interval * 1000
      let nextCells = mutate area cells
      printD area $ difference cells nextCells
      loop area nextCells