var View = function(elementId) {
  this.canvas = document.getElementById(elementId);
  this.context = this.canvas.getContext("2d");
  this.canvasData = this.context.getImageData(0, 0, this.canvas.width, this.canvas.height);
}
View.prototype.drawPixel = function(args) {
  var index = (args.x + args.y * this.canvas.width) * 4;

  this.canvasData.data[index + 0] = args.r;
  this.canvasData.data[index + 1] = args.g;
  this.canvasData.data[index + 2] = args.b;
  this.canvasData.data[index + 3] = args.a;
};
View.prototype.drawObject = function(args) {
  var width = args.objectArr.length;
  var height = args.objectArr[0].length;
  this.context.clearRect(args.x, args.y, width, height);

  args.objectArr.forEach(function(row, rIndex) {
    row.forEach(function(col, cIndex) {
      if(col == "x") {
        this.drawPixel({
          x: args.x + cIndex,
          y: args.y + rIndex,
          r: args.color.r,
          g: args.color.g,
          b: args.color.b,
          a: args.color.a
        });
      }
    }.bind(this));
  }.bind(this));
};

@@ -1040,12 +1040,249 @@
 (this));%0A%7D;%0A
+View.prototype.drawCircle = function(args) %7B%0A  this.context.fillStyle = PELLET_COLOR;%0A  this.context.beginPath();%0A  this.context.arc(args.x, args.y, args.rad, 0, 2 * Math.PI, false);%0A  this.context.closePath();%0A  this.context.fill();%0A%7D;%0A

Add View.drawCircle