Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
// getAdjective.js

(function () {
  /* global adventurejs A */

  var p = adventurejs.Dictionary.prototype;

  /**
   * Determine whether string is recognized as an getAdjective
   * and return the string.
   * @memberOf adventurejs.Dictionary
   * @method adventurejs.Dictionary#getAdjective
   * @kind function
   * @param {String} word
   * @returns {String|Boolean}
   */
  p.getAdjective = function Dictionary_getAdjective(word) {
    if (this.adjectives.indexOf(word) > -1) return word;
    else return false;
  };
})();