From 34dc64a1387f2904b4c23ac3fcfea35c9670088e Mon Sep 17 00:00:00 2001 From: Aleksi Heikkila Date: Wed, 27 Nov 2024 17:19:50 +0200 Subject: [help-komento] --- src/scalevalapokalypsi/Model/Entities/Player.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/scalevalapokalypsi/Model/Entities/Player.scala') 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 -- cgit v1.2.3