// Whiteboard.js
(function () {
/*global adventurejs A*/
"use strict";
/**
* @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.WritingSurface.Whiteboard
* @augments adventurejs.WritingSurface
* @class adventurejs.Whiteboard
* @ajsconstruct MyGame.createAsset({ "class":"Whiteboard", "name":"foo", [...] })
* @ajsconstructedby adventurejs.Game#createAsset
* @ajsnavheading WritingClasses
* @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 A whiteboard that can be written on and erased.
* @classdesc
* <p>
* <strong>Whiteboard</strong> is a subclass of
* {@link adventurejs.WritingSurface|WritingSurface} with
* asset.dov.write.enabled and
* asset.dov.erase.enabled set to true.
* <code class="property">asset.dov.write</code>
* allows it to receive strings using the
* {@link adventurejs.Verb|Verb} {@link write}.
* <code class="property">asset.dov.erase</code>
* allows it to be erased and
* <code class="property">asset.dov.erase.with_nothing</code>
* allows it to be erased without an eraser.
* With Whiteboard's
* <code class="property">append_written_strings_to_description</code>
* property set to true, anything written
* on it can be included in the Whiteboard's description.
* </p>
* <pre class="display border outline">
* <span class="input">> write "I am good at business" on whiteboard
* You write "I am good at business" on the whiteboard with the chalk.
*
* <span class="input">> examine whiteboard
* It's a big whiteboard. Written on it is a phrase: "I am good at business".
* </pre>
* <h3 class="examples">Example:</h3>
* <pre class="display"><code class="language-javascript">MyGame.createAsset({
* class: "Whiteboard",
* name: "whiteboard",
* descriptions: { look: "It's a big office-style whiteboard. ", },
* place: { in: "Office" },
* });
* </code></pre>
**/
class Whiteboard extends adventurejs.WritingSurface {
constructor(name, game_name) {
super(name, game_name);
this.class = "Whiteboard";
this.synonyms = ["whiteboard", "white board"];
// this.adjectives = [ "white" ];
this.setDOV({ erase: { with_nothing: true } });
this.setDOV({ write: { with_classes: "Marker" } });
this.unsetDOV("take");
}
}
adventurejs.Whiteboard = Whiteboard;
})();