 
 ###
 
+###
+How does death work?
+just reset after animation
+###
 
 level_cnv = document.getElementById('level')
 

  (x: -bot_size * (hr3-rr3), y: bot_size/2)
]

renderBot = (ctx) ->
  bp = bot_points
  ctx.save()
  ctx.translate((@showxi + .5) * cell_size, (@showyi + .5) * cell_size)

        @animation_mode = levelAnimMode.MOVING
        @show_current_command = step_command
      else
        @move_control = next_move_control
        @animation_mode = levelAnimMode.DYING
        @show_current_command = step_command

  # immediately run this if we switched to MOVING above
  if @animation_mode == levelAnimMode.MOVING or
     @animation_mode == levelAnimMode.DYING
    rel_t = (t-@move_control.start.t)/@move_control.duration

    if rel_t >= 1
      if @animation_mode == levelAnimMode.DYING
        # revert after death
        @reset()
      else # MOVING
        @animation_mode = levelAnimMode.READY
    else
      @bot.showxi = lerp rel_t, @move_control.start.x, @bot.xi
      @bot.showyi = lerp rel_t, @move_control.start.y, @bot.yi
      @bot.showdir = @bot.dir

  @last_t = t

