code: function(x, y) {
      x = Math.floor(x);
      y = Math.floor(y);
  
      if (x < 0 || x > this.size - 1 || y < 0 || y > this.size - 1) {
        return -1;
      }
  
      return this.grid[y * this.size + x];
    }
docs: Check if a gird location is out of bounds, a wall or empty.
  @param  {Number} x x-coordinate
  @param  {Number} y y-coordinate
  @return {Number}   -1, 0, 1