   renderCB: =>
     g.clear(@ctx, @W, @H)
     g.border(@ctx, @W, @H)
+
+
+    for x in [0...@Wi]
+      for y in [0...@Hi]
+        switch @level[x][y].type
+          when 'empty'
+            true
+          when 'program'
+            @renderProgramCell(x, y)
+          when 'obstacle'
+            @renderObstacleCell(x, y)
 
     bot =
       showxi: @botx


    bot.render(@ctx)

    @ctx.save()
    @ctx.translate(30,30)
    @program.render(@ctx)
    @ctx.restore()

    @ctx.save()
    @ctx.translate(230,30)
    @mapping.render(@ctx)
    @ctx.restore()

    @ctx.save()
    @ctx.translate(10.5,10.5)
    g.setStyle(@ctx, g.lined_style)
    g.renderNumber(@ctx, 1234567890)
    @ctx.restore()
    
    if not @stop_render
      requestAnimationFrame(@renderCB)


        dir
      )

  renderProgramCell: (x, y) ->
    cs = g.cell_size
    @ctx.save()
    @ctx.fillStyle = 'blue'
    @ctx.fillRect(x*cs, y*cs, cs, cs)
    @ctx.restore()

  renderObstacleCell: (x, y) ->
    cs = g.cell_size
    @ctx.save()
    @ctx.fillStyle = 'white'
    @ctx.fillRect(x*cs, y*cs, cs, cs)
    @ctx.restore()

  execute: () ->
    @program.active = @pc
    @mapping.active = @program.instructions[@pc]
