Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// Lever.js
(function () {
  /*global adventurejs A*/
  "use strict";

  /**
   * @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.Control.Lever
   * @augments adventurejs.Control
   * @class adventurejs.Lever
   * @ajsconstruct MyGame.createAsset({ "class":"Lever", "name":"foo", [...] })
   * @ajsconstructedby adventurejs.Game#createAsset
   * @ajsnavheading ControlClasses
   * @param {String} game_name The name of the top level game object.
   * @param {String} name A name for the object, to be serialized and used as ID.
   * @summary Pull the lever!
   * @tutorial Tangibles_Controllers
   * @classdesc
   * <p>
   * <strong>Lever</strong> is a subclass of
   * {@link adventurejs.Control|Control} that can be
   * pushed or pulled.
   * </p>
   * <pre class="display"><code class="language-javascript">
   * </code></pre>
   **/
  class Lever extends adventurejs.Control {
    constructor(name, game_name) {
      super(name, game_name);
      this.class = "Lever";

      this.singlePluralPairs = [["lever ", "levers"]];

      this.setDOVs(["push", "pull"]);
    }
  }
  adventurejs.Lever = Lever;
})();