function Path(toX, toY, passableCallback, options) {
      if (options === void 0) {
        options = {};
      }
      this._toX = toX;
      this._toY = toY;
      this._passableCallback = passableCallback;
      this._options = Object.assign({
        topology: 8
      }, options);
      this._dirs = DIRS[this._options.topology];
      if (this._options.topology == 8) {
        /* reorder dirs for more aesthetic result (vertical/horizontal first) */
        this._dirs = [this._dirs[0], this._dirs[2], this._dirs[4], this._dirs[6], this._dirs[1], this._dirs[3], this._dirs[5], this._dirs[7]];
      }
    }
@class Abstract pathfinder
@param {int} toX Target X coord
@param {int} toY Target Y coord
@param {function} passableCallback Callback to determine map passability
@param {object} [options]
@param {int} [options.topology=8]