From ea18a265a22ffc4c3f6ec3ca9d2f542552da9705 Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Thu, 14 Nov 2024 19:52:24 +0200 Subject: Added immediate turn start for client, required minor protocol tweak --- src/main/scala/Server/Server.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/scala/Server/Server.scala') diff --git a/src/main/scala/Server/Server.scala b/src/main/scala/Server/Server.scala index a03bc53..5eb15cb 100644 --- a/src/main/scala/Server/Server.scala +++ b/src/main/scala/Server/Server.scala @@ -82,13 +82,17 @@ class Server( assert(this.adventure.isDefined) c.gameStart() val name = c.getName + val entity: Option[Entity] = name match case Some(n) => this.adventure match case Some(a) => a.getPlayer(n) case None => None case None => None entity.foreach(c.giveEntity(_)) - this.writeToClient(s"$timeLimit\r\n", c) + + this.writeToClient( + s"$timeLimit\r\n${this.turnStartInfo(c)}", c + ) /** Helper function to determine if the next turn can be taken */ -- cgit v1.2.3