 
   ctx.restore()
 
+  # goal
+  ctx.save()
+  ctx.lineWidth = 1.5
+  ctx.strokeStyle = 'white'
+  ctx.save()
+
+  ctx.translate(
+    (@initial_bot_location.xi+.5) * cell_size,
+    (@initial_bot_location.yi+.5) * cell_size)
+  ctx.beginPath()
+  ctx.arc(0, 0, cell_size*.4, 0, Math.PI)
+  ctx.stroke()
+  ctx.restore()
+
+  # item
+  @bot.has_item = true
+  if !@bot.has_item
+    ctx.translate( (@item_location.xi+.5)*cell_size,
+                   (@item_location.yi+.5)*cell_size)
+  else
+    ctx.translate( (@bot.showxi+.5)*cell_size,
+                   (@bot.showyi+.5)*cell_size)
+  ctx.beginPath()
+  ctx.arc(0,0,cell_size*.4,0,Math.PI,true)
+  ctx.stroke()
+  ctx.restore()
+
+
   # bot
   @bot.render(ctx)
 
   # commands
   ctx = prog_ctx
   for cmd, i in @commands
-    row = i // commands_per_row
-    col = i % commands_per_row
+    col = i
+
+    cur = (@show_current_command? and i == @show_current_command)
+    row = 0
     renderCommand(ctx, cmd, (x: col*command_size, y: row*command_size),
-      (@show_current_command? and i == @show_current_command))
-
-  # artificial current_command if we don't have an existing command selected
-  if @show_current_command != null && @show_current_command >= @commands.length
-    row = @commands.length // commands_per_row
-    col = @commands.length % commands_per_row
-    renderCommand(ctx, empty_cmd, (x: col*command_size, y: row*command_size),
-      true)
+      cur and (
+        @mode == levelMode.FULLPLAYING or
+        @mode == levelMode.TURNAROUND), false)
+
+    cur = (@show_current_command? and i == @show_current_command)
+    row = 1
+    renderCommand(ctx, cmd, (x: col*command_size, y: row*command_size),
+      cur and @mode == levelMode.REVPLAYING, true)
+
+  if @commands.length > 0
+    renderCommand(ctx, reverse_cmd,
+      (x: @commands.length*command_size, y: .5*command_size),
+      @show_current_command? and @commands.length == @show_current_command and
+      @mode == levelMode.REVPLAYING)
 
   return
 

# level

levelMode =
  STOPPED: 1
  PLAYING: 2
  FULLPLAYING: 3
  TURNAROUND: 4

noActionCommand = (level) ->
  return

arrowCommandRender = (ctx, rev) ->
  ics = inner_command_size * if rev then -1 else 1

  renderArrow(ctx, @dir.theta, ics)

reverseCommandRender = (ctx) ->
  ics  = inner_command_size
