diff options
author | Joel Kronqvist <joel.kronqvist@iki.fi> | 2024-11-22 22:42:22 +0200 |
---|---|---|
committer | Joel Kronqvist <joel.kronqvist@iki.fi> | 2024-11-22 22:42:22 +0200 |
commit | db5612ed9734d51e6fcd0d7b5a7635e49b773581 (patch) | |
tree | e23e607c9d9eeedc377bf44e57c2b58b41d0389d /src/scalevalapokalypsi/Model/Area.scala | |
parent | 49985d1d11c426968fc298469671326aace96d00 (diff) | |
download | scalevalapokalypsi-db5612ed9734d51e6fcd0d7b5a7635e49b773581.tar.gz scalevalapokalypsi-db5612ed9734d51e6fcd0d7b5a7635e49b773581.zip |
Character safety checking, supported terminals updated
Diffstat (limited to 'src/scalevalapokalypsi/Model/Area.scala')
-rw-r--r-- | src/scalevalapokalypsi/Model/Area.scala | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/scalevalapokalypsi/Model/Area.scala b/src/scalevalapokalypsi/Model/Area.scala index 96392ba..c07f2f9 100644 --- a/src/scalevalapokalypsi/Model/Area.scala +++ b/src/scalevalapokalypsi/Model/Area.scala @@ -103,33 +103,6 @@ class Area(val name: String, var description: String): def removeEntity(entityName: String): Option[Entity] = this.entities.remove(entityName.toLowerCase()) - /** Returns a multi-line description of the area as a player sees it. This - * includes a basic description of the area as well as information about - * exits and items. If there are no items present, the return value has the - * form "DESCRIPTION\n\nExits available: - * DIRECTIONS SEPARATED BY SPACES". If there are one or more items present, - * the return value has the form "DESCRIPTION\nYou see here: ITEMS - * SEPARATED BY SPACES\n\nExits available: DIRECTIONS SEPARATED BY SPACES". - * The items and directions are listed in an arbitrary order. - */ - def fullDescription: String = - val exitList = this.neighbors.keys.mkString(" ") - val itemList = this.items.keys.mkString(" ") - val entityList = this.getEntityNames.mkString(" ") - val itemDescription = - if this.items.nonEmpty then - s"\nYou see here: ${itemList}" - else "" - val entityDescription = - if this.entities.nonEmpty then - s"\nThere are entities: ${entityList}" - else "" - (this.description + - itemDescription + - entityDescription + - s"\n\nExits available: $exitList") - - /** Returns a single-line description of the area for debugging purposes. */ override def toString = this.name + ": " + this.description.replaceAll("\n", " ").take(150) |