   bugs  = starting_bugs()
   render_game canvas, bugs
 
-  #next_turn bugs, canvas, turns
+  next_turn bugs, canvas, turns
 
 next_turn = (bugs, canvas, turns) ->
-  bugs = next_iteration bugs
+  next_iteration bugs
   render_game canvas, bugs
 
-  if turns < 1000
-    setTimeout((-> next_turn bugs, canvas, turns + 1), 10)
+  if turns < 10
+    setTimeout((-> next_turn bugs, canvas, turns + 1), 100)
 
-starting_bugs = ->
+empty_grid = ->
   grid = []
 
   for x in [0..59]

    x: x, y: y

next_iteration = (bugs) ->
  bugs

render_game = (canvas, bugs) ->
  canvas.clear()

create_fly_trap =
  (info) ->
    if info.front == 'OTHER' then 'EAT' else 'TURN_LEFT'

create_moth =
  (info) ->
    if info.front == 'OTHER'
      'EAT'
    else if info.front == 'EMPTY'
      'WALK_FORWARD'
    else
      'TURN_LEFT'

shuffle_array = (array) ->
  i = array.length
  return [] if i is 0

  while --i
      j = Math.floor(Math.random() * (i+1))
      [array[i], array[j]] = [array[j], array[i]]
