anchor.diff:    ctx.imageSmoothingEnabled = false;
     gameContainer.append(canvas);
   
  -  RenderContext renderContext = new RenderContext(ctx, canvas);
     GameLoopHtml gameLoop = new GameLoopHtml(canvas);
  -  gameLoop.onUpdate = update;
  -  gameLoop.onRender = (gameLoop) => render(gameLoop, renderContext);
  +  UpdateContext updateContext = new UpdateContext(gameLoop, canvas);
  +  RenderContext renderContext = new RenderContext(gameLoop, ctx, canvas);
  +  gameLoop.onUpdate = (gameLoop) => update(updateContext);
  +  gameLoop.onRender = (gameLoop) => render(renderContext);
   
  -  textures.add(#invader, "sprites.png", 0, 0, 16, 16);
  -  textures.add(#player, "sprites.png", 16, 0, 16, 16);
  +  entities.add(new Ship(100, 100));
   
     gameLoop.start();
   }
   
  -update(GameLoopHtml gameLoop) {
  +update(UpdateContext u) {
  +  entities.forEach((e) => e.update(u));
   }
   
  -render(GameLoopHtml gameLoop, RenderContext r) {
  +render(RenderContext r) {
     r.ctx.setFillColorRgb(0, 0, 0, 255);
     r.ctx.fillRect(0, 0, r.w, r.h);
  -
  -  textures[#player].draw(r, 0, 0);
  +  entities.forEach((e) => e.render(r));
   }
   
   
  +class UpdateContext {
  +  GameLoopHtml gameLoop;
  +  CanvasElement _canvas;
  +
  +  UpdateContext(this.gameLoop, this._canvas);
  +
  +  int get w => _canvas.width;
  +  int get h => _canvas.height;
  +}
  +
   class RenderContext {
  +  GameLoopHtml gameLoop;
     CanvasRenderingContext2D ctx;
     CanvasElement _canvas;
   
  -  RenderContext(this.ctx, this._canvas);
  +  RenderContext(this.gameLoop, this.ctx, this._canvas);
   
     int get w => _canvas.width;
     int get h => _canvas.height;
  
positive.code:   Texture(this._tex, this._tx, this._ty, this._tw, this._th);
  
    draw(RenderContext r, int x, int y) {
      r.ctx.drawImage(_tex, x, y);
    }
  }
  
  
negative.code: }
  
  
  class Entity {
    update(UpdateContext u) {}
    render(RenderContext r) {}
  }
  
  
  class Ship extends Entity {
    Texture _tex;
    int _x, _y;
  
    Ship(this._x, this._y) {
      _tex = textures.add(#player, "sprites.png", 16, 0, 16, 16);
    }
  
    update(UpdateContext u) {
      if (u.gameLoop.keyboard.isDown(Keyboard.LEFT)) {
        _x -= 1;
      }
      else if (u.gameLoop.keyboard.isDown(Keyboard.RIGHT)) {
        _x += 1;
      }
    }
    render(RenderContext r) {
      _tex.draw(r, _x, _y);
    }
  }
  