aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/Model
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2024-11-09 16:32:09 +0200
committerJoel Kronqvist <joel.kronqvist@iki.fi>2024-11-09 16:32:09 +0200
commit129b49a3876ceb68f271c311d5e45efb2e205300 (patch)
tree246a47a5990167c73b95fc6e02452de7f6aca6b3 /src/main/scala/Model
parent239571e3408a3187953bef1dd5d516461bad0e31 (diff)
downloadscalevalapokalypsi-129b49a3876ceb68f271c311d5e45efb2e205300.tar.gz
scalevalapokalypsi-129b49a3876ceb68f271c311d5e45efb2e205300.zip
Made & implemented clearer protocol, added client functionality
Diffstat (limited to 'src/main/scala/Model')
-rw-r--r--src/main/scala/Model/Area.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/scala/Model/Area.scala b/src/main/scala/Model/Area.scala
index f5b5289..ae1c98e 100644
--- a/src/main/scala/Model/Area.scala
+++ b/src/main/scala/Model/Area.scala
@@ -20,6 +20,10 @@ class Area(val name: String, var description: String):
def neighbor(direction: String): Option[Area] =
this.neighbors.get(direction)
+ def getNeighborNames: Iterable[String] = this.neighbors.keys
+ def getItemNames: Iterable[String] = this.items.keys
+ def getEntityNames: Iterable[String] = this.entities.keys
+
/** Tells whether this area has a neighbor in the given direction.
*
* @param direction the direction to check