From 129b49a3876ceb68f271c311d5e45efb2e205300 Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Sat, 9 Nov 2024 16:32:09 +0200 Subject: Made & implemented clearer protocol, added client functionality --- src/main/scala/Model/Area.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/scala/Model/Area.scala') 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 -- cgit v1.2.3