From eeb83ca379e7f4ab1a86596b80e206df48371454 Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Fri, 15 Nov 2024 16:45:09 +0200 Subject: Added observations for Players in model & implemented sending them to other clients --- src/main/scala/Client/Client.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/scala/Client/Client.scala') diff --git a/src/main/scala/Client/Client.scala b/src/main/scala/Client/Client.scala index 7b0f8b2..26b9264 100644 --- a/src/main/scala/Client/Client.scala +++ b/src/main/scala/Client/Client.scala @@ -112,7 +112,7 @@ class Client(socket: Socket): s"\n\n${this.turnInfo}\n${this.actionGetterIndicator}" private def displayAction(action: String): Unit = - println(action) + println(s"> $action") if this.canAct then print(this.actionGetterIndicator) @@ -149,7 +149,7 @@ class Client(socket: Socket): this.lastTurnStart = currentTimeMillis / 1000 case ServerLineState.ActionDescription => - if line.head == ACTION_BLOCKING_INDICATOR then + if !line.isEmpty && line.head == ACTION_BLOCKING_INDICATOR then this.canAct = false this.displayAction(line.tail) -- cgit v1.2.3