   canvas.setHeight  400
   canvas.setWidth  600
 
-  turns = 0
   bugs  = starting_bugs()
   render_game canvas, bugs
 
-  next_turn bugs, canvas, turns
-  make_chart '#jitterbug_progress_chart_svg'
-
-next_turn = (bugs, canvas, turns) ->
+  next_turn bugs, canvas
+
+next_turn = (bugs, canvas) ->
   next_iteration bugs
   render_game canvas, bugs
 
-  if turns < 1000
-    setTimeout((-> next_turn bugs, canvas, turns + 1), 50)
+  if bugs.turns % 10 == 0
+    stats = bugs.names.map((name) -> bugs.stats[name])
+    make_chart '#jitterbug_progress_chart_svg', stats
+
+  if bugs.turns < 1000
+    bugs.turns += 1
+    setTimeout((-> next_turn bugs, canvas), 50)
 
 empty_grid = ->
   grid = []

    color:     color
    serial:    (bugs.next_serial += 1)

random_location = (bugs) ->
  x = random_num 59
  y = random_num 39

make_chart = (svg_id, bug_stats) ->
  $(svg_id).empty()

  xScale     = new Plottable.Scale.Linear()
  yScale     = new Plottable.Scale.Linear()
