aboutsummaryrefslogtreecommitdiff
path: root/src/scalevalapokalypsi/Model/Adventure.scala
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2024-11-17 14:19:58 +0200
committerJoel Kronqvist <joel.kronqvist@iki.fi>2024-11-17 14:20:27 +0200
commit5060c66738898913ca880d83b0fdcd5be2e0b59d (patch)
treebd4ecd70ebb8cc0342bd0a29c91c5b27fed38fb6 /src/scalevalapokalypsi/Model/Adventure.scala
parent4de67b497e0e229fe4a42f66f833640b6e50fd5a (diff)
downloadscalevalapokalypsi-5060c66738898913ca880d83b0fdcd5be2e0b59d.tar.gz
scalevalapokalypsi-5060c66738898913ca880d83b0fdcd5be2e0b59d.zip
Small style fixes (mostly shortening comment lines written by others...)
Diffstat (limited to 'src/scalevalapokalypsi/Model/Adventure.scala')
-rw-r--r--src/scalevalapokalypsi/Model/Adventure.scala16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/scalevalapokalypsi/Model/Adventure.scala b/src/scalevalapokalypsi/Model/Adventure.scala
index 2bf6cfe..e751280 100644
--- a/src/scalevalapokalypsi/Model/Adventure.scala
+++ b/src/scalevalapokalypsi/Model/Adventure.scala
@@ -1,15 +1,17 @@
package scalevalapokalypsi.Model
import scala.collection.mutable.Map
+import scalevalapokalypsi.Model.Entities.*
-/** The class `Adventure` represents text adventure games. An adventure consists of a player and
- * a number of areas that make up the game world. It provides methods for playing the game one
- * turn at a time and for checking the state of the game.
+/** The class `Adventure` holds data of the game world and provides methods
+ * for implementing a user interface for it.
*
- * N.B. This version of the class has a lot of “hard-coded” information that pertains to a very
- * specific adventure game that involves a small trip through a twisted forest. All newly created
- * instances of class `Adventure` are identical to each other. To create other kinds of adventure
- * games, you will need to modify or replace the source code of this class. */
+ * Data about the game world includes remote players, other entities and areas.
+ * The methods are documented below.
+ *
+ * @param playerNames a vector of the names of players to create and add
+ * to the adventure straight away
+ */
class Adventure(val playerNames: Vector[String]):
private val middle = Area("Forest", "You are somewhere in the forest. There are a lot of trees here.\nBirds are singing.")