aboutsummaryrefslogtreecommitdiff
path: root/src/scalevalapokalypsi/Model/Entities/Player.scala
diff options
context:
space:
mode:
authorAleksi Heikkila <aleksi.e.heikkila@aalto.fi>2024-11-23 21:48:32 +0200
committerAleksi Heikkila <aleksi.e.heikkila@aalto.fi>2024-11-23 21:48:32 +0200
commitb11c02e8f1f4dea09847da999c2acb2f96df8a58 (patch)
tree9ded38857c98ec74a5917202afe0605ddf0310b3 /src/scalevalapokalypsi/Model/Entities/Player.scala
parentfe2543627bcec1ea0f7a429bede20ca293458ba9 (diff)
downloadscalevalapokalypsi-b11c02e8f1f4dea09847da999c2acb2f96df8a58.tar.gz
scalevalapokalypsi-b11c02e8f1f4dea09847da999c2acb2f96df8a58.zip
Inventory, pickup loppuun, drop loppuun
Diffstat (limited to 'src/scalevalapokalypsi/Model/Entities/Player.scala')
-rw-r--r--src/scalevalapokalypsi/Model/Entities/Player.scala6
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