 render_game = (canvas, bugs) ->
   canvas.clear()
 
-  canvas.add new fabric.Rect
-    left:   random_num(600 - 10)
-    top:    random_num(400 - 10)
-    height: 10
-    width:  10
-    fill:   'rgb(255,0,0)'
+  for column in bugs.grid
+    for bug in column
+      if bug?
+        canvas.add new fabric.Rect
+          left:   bug.location.x * 10
+          top:    bug.location.y * 10
+          height: 10
+          width:  10
+          fill:   bug.color
 
   canvas.renderAll()
 
 random_num = (max, min = 0) ->
   Math.floor(Math.random() * (max - min) + min)
+
+create_fly_trap =
+  (info) ->
+    if info.front == 'OTHER' then 'EAT' else 'TURN_LEFT'

    setTimeout((-> next_turn bugs, canvas, turns + 1), 10)

starting_bugs = ->
  []

next_iteration = (bugs) ->
  bugs

  canvas.setWidth  600

  turns = 0
  bugs  = starting_bugs()
  render_game canvas, bugs

  #next_turn bugs, canvas, turns

next_turn = (bugs, canvas, turns) ->
  bugs = next_iteration bugs
