Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// doVerb.js

(function () {
  /*global adventurejs A*/
  "use strict";

  var p = adventurejs.Dictionary.prototype;

  /**
   * Passthrough method to call a verb.
   * @memberOf adventurejs.Dictionary
   * @method adventurejs.Dictionary#doVerb
   * @param {String} verb
   */
  p.doVerb = function (verb) {
    this.game.log(
      "log",
      "high",
      "Dictionary.doVerb > verb: " + verb,
      "dictionary"
    );
    if ("undefined" !== typeof this.verbs[verb]) {
      this.verbs[verb].do();
    } else return false;
  };
})();