System.register(["__unresolved_0"], function (_export, _context) {
  "use strict";

  var _loader, _cjsExports, __cjsMetaURL;

  _export("default", void 0);

  return {
    setters: [function (_unresolved_) {
      _loader = _unresolved_.default;
    }],
    execute: function () {
      _loader.define(_context.meta.url, function (exports, _require, module, __filename, __dirname) {
        var require = _loader.createRequireWithReqMap({}, _require);

        (function () {
          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          exports.Node = void 0;

          var Node = /*#__PURE__*/function () {
            function Node(aParams) {
              this.id = aParams.id;
              this.position = aParams.position;
              this.hValue = 0;
              this.gValue = 0;
              this.fValue = 0;
              this.parentNode = undefined;
              this.isOnClosedList = false;
              this.isOnOpenList = false;
              this.isWalkable = aParams.walkable || true;
            }
            /**
             * Calculate or Recalculate the F value
             * This is a private function
             */


            var _proto = Node.prototype;

            _proto.calculateFValue = function calculateFValue() {
              this.fValue = this.gValue + this.hValue;
            }
            /**
             * Set the g value of the node
             */
            ;

            _proto.setGValue = function setGValue(gValue) {
              this.gValue = gValue; // The G value has changed, so recalculate the f value

              this.calculateFValue();
            }
            /**
             * Set the h value of the node
             */
            ;

            _proto.setHValue = function setHValue(hValue) {
              this.hValue = hValue; // The H value has changed, so recalculate the f value

              this.calculateFValue();
            }
            /**
             * Reset the FGH values to zero
             */
            ;

            _proto.setFGHValuesToZero = function setFGHValuesToZero() {
              this.fValue = this.gValue = this.hValue = 0;
            }
            /**
             * Getter functions
             */
            ;

            _proto.getFValue = function getFValue() {
              return this.fValue;
            };

            _proto.getGValue = function getGValue() {
              return this.gValue;
            };

            _proto.getHValue = function getHValue() {
              return this.hValue;
            };

            _proto.getParent = function getParent() {
              return this.parentNode;
            };

            _proto.getIsOnClosedList = function getIsOnClosedList() {
              return this.isOnClosedList;
            };

            _proto.getIsOnOpenList = function getIsOnOpenList() {
              return this.isOnOpenList;
            };

            _proto.getIsWalkable = function getIsWalkable() {
              return this.isWalkable;
            }
            /**
             * Setter functions
             */
            ;

            _proto.setParent = function setParent(parent) {
              this.parentNode = parent;
            };

            _proto.setIsOnClosedList = function setIsOnClosedList(isOnClosedList) {
              this.isOnClosedList = isOnClosedList;
            };

            _proto.setIsOnOpenList = function setIsOnOpenList(isOnOpenList) {
              this.isOnOpenList = isOnOpenList;
            };

            _proto.setIsWalkable = function setIsWalkable(isWalkable) {
              this.isWalkable = isWalkable;
            };

            return Node;
          }();

          exports.Node = Node;
        })();

        _export("default", _cjsExports = module.exports);
      });

      _export("__cjsMetaURL", __cjsMetaURL = _context.meta.url);
    }
  };
});
//# sourceMappingURL=node.js.map