diff options
Diffstat (limited to 'src/scalevalapokalypsi/Model/Entities/Player.scala')
-rw-r--r-- | src/scalevalapokalypsi/Model/Entities/Player.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/scalevalapokalypsi/Model/Entities/Player.scala b/src/scalevalapokalypsi/Model/Entities/Player.scala index cac5bf1..1dd5187 100644 --- a/src/scalevalapokalypsi/Model/Entities/Player.scala +++ b/src/scalevalapokalypsi/Model/Entities/Player.scala @@ -1,6 +1,6 @@ package scalevalapokalypsi.Model.Entities -import scala.collection.mutable.Buffer +import scala.collection.mutable.{Buffer, Map} import scalevalapokalypsi.Model.* /** A `Player` object represents a player character controlled by one real-life player @@ -18,6 +18,7 @@ class Player(name: String, initialLocation: Area) extends Entity(name, initialLo private val observedEvents: Buffer[Event] = Buffer.empty private var pendingSingEffect: Option[SingEffect] = None + override def observeString(observation: String): Unit = this.observations.append(observation) override def observe(event: Event): Unit = @@ -71,4 +72,7 @@ class Player(name: String, initialLocation: Area) extends Entity(name, initialLo )) event.foreach(this.location.observeEvent(_)) + + + end Player |