From 5060c66738898913ca880d83b0fdcd5be2e0b59d Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Sun, 17 Nov 2024 14:19:58 +0200 Subject: Small style fixes (mostly shortening comment lines written by others...) --- src/scalevalapokalypsi/Server/Client.scala | 3 ++- src/scalevalapokalypsi/Server/Server.scala | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/scalevalapokalypsi/Server') diff --git a/src/scalevalapokalypsi/Server/Client.scala b/src/scalevalapokalypsi/Server/Client.scala index 6ce2522..8716ca9 100644 --- a/src/scalevalapokalypsi/Server/Client.scala +++ b/src/scalevalapokalypsi/Server/Client.scala @@ -4,7 +4,8 @@ import java.net.Socket import scala.math.min import scalevalapokalypsi.constants.* import ServerProtocolState.* -import scalevalapokalypsi.Model.{Action,Player,Entity} +import scalevalapokalypsi.Model.Action +import scalevalapokalypsi.Model.Entities.Player class Client(val socket: Socket): private var incompleteMessage: Array[Byte] = diff --git a/src/scalevalapokalypsi/Server/Server.scala b/src/scalevalapokalypsi/Server/Server.scala index 13ca2f5..f18d5c0 100644 --- a/src/scalevalapokalypsi/Server/Server.scala +++ b/src/scalevalapokalypsi/Server/Server.scala @@ -3,15 +3,15 @@ package scalevalapokalypsi.Server // TODO: TLS/SSL / import javax.net.ssl.SSLServerSocketFactory -import java.lang.Thread.{currentThread, sleep} -import java.io.IOException -import java.net.{ServerSocket, Socket} +import scalevalapokalypsi.Model.Adventure +import scalevalapokalypsi.Model.Entities.Player import scalevalapokalypsi.constants.* -import scalevalapokalypsi.Model.{Adventure,Entity,Player} import scalevalapokalypsi.utils.stringToByteArray +import java.io.IOException import java.lang.System.currentTimeMillis -import scala.util.Try +import java.lang.Thread.sleep +import java.net.{ServerSocket, Socket} /** `Server` exists to initialize a server for the game -- cgit v1.2.3