aboutsummaryrefslogtreecommitdiff
path: root/src/scalevalapokalypsi/Model/Entities/Player.scala
diff options
context:
space:
mode:
authorAleksi Heikkila <aleksi.e.heikkila@aalto.fi>2024-11-23 22:33:53 +0200
committerAleksi Heikkila <aleksi.e.heikkila@aalto.fi>2024-11-23 22:33:53 +0200
commit27dd937617cce1e43df1c16e12050f6e88763d54 (patch)
tree8247736f7c4d5b1a0c1541c25f477e73e5783944 /src/scalevalapokalypsi/Model/Entities/Player.scala
parentb11c02e8f1f4dea09847da999c2acb2f96df8a58 (diff)
parent28b83db50f33cb704311ffe608dcd8c4412635cf (diff)
downloadscalevalapokalypsi-27dd937617cce1e43df1c16e12050f6e88763d54.tar.gz
scalevalapokalypsi-27dd937617cce1e43df1c16e12050f6e88763d54.zip
Merge branch 'master' of ssh://cron4.fi/~/O1-game
Diffstat (limited to 'src/scalevalapokalypsi/Model/Entities/Player.scala')
-rw-r--r--src/scalevalapokalypsi/Model/Entities/Player.scala5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/scalevalapokalypsi/Model/Entities/Player.scala b/src/scalevalapokalypsi/Model/Entities/Player.scala
index 1dd5187..d6b3529 100644
--- a/src/scalevalapokalypsi/Model/Entities/Player.scala
+++ b/src/scalevalapokalypsi/Model/Entities/Player.scala
@@ -18,9 +18,6 @@ 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 =
this.observedEvents.append(event)
@@ -30,7 +27,7 @@ class Player(name: String, initialLocation: Area) extends Entity(name, initialLo
val res = (res1 ++ res2).toVector
observations.clear()
observedEvents.clear()
- res
+ res.filter(s => !(s.isEmpty))
/** Returns whether this player has a pending sing effect. */
def isSinging: Boolean = this.pendingSingEffect.isDefined