diff options
author | Aleksi Heikkila <aleksi.e.heikkila@aalto.fi> | 2024-11-27 17:19:50 +0200 |
---|---|---|
committer | Aleksi Heikkila <aleksi.e.heikkila@aalto.fi> | 2024-11-27 17:19:50 +0200 |
commit | 34dc64a1387f2904b4c23ac3fcfea35c9670088e (patch) | |
tree | 2429a3743093dafd17378f4466e0c471afede373 /src/scalevalapokalypsi/Model/Entities | |
parent | 98407b35ff477f372baa92bf582b90a961d4ad16 (diff) | |
download | scalevalapokalypsi-34dc64a1387f2904b4c23ac3fcfea35c9670088e.tar.gz scalevalapokalypsi-34dc64a1387f2904b4c23ac3fcfea35c9670088e.zip |
[help-komento]
Diffstat (limited to 'src/scalevalapokalypsi/Model/Entities')
-rw-r--r-- | src/scalevalapokalypsi/Model/Entities/Player.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scalevalapokalypsi/Model/Entities/Player.scala b/src/scalevalapokalypsi/Model/Entities/Player.scala index 62d4180..4fedbec 100644 --- a/src/scalevalapokalypsi/Model/Entities/Player.scala +++ b/src/scalevalapokalypsi/Model/Entities/Player.scala @@ -41,7 +41,7 @@ class Player( val res = (res1 ++ res2).toVector observations.clear() observedEvents.clear() - res.filter(s => !(s.isEmpty)) + res.filter(s => s.nonEmpty) /** Returns whether this player has a pending sing effect. */ def isSinging: Boolean = this.pendingSingEffect.isDefined @@ -82,7 +82,7 @@ class Player( this.location.observeEvent(event) this.pendingSingEffect .map(ef => ef(singQuality)) - .map(this.location.observeEvent(_)) + .foreach(this.location.observeEvent(_)) this.pendingSingEffect = None end Player |