From c87263e9e493fe6c130f5ad6a523871c08987f4c Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Sat, 9 Nov 2024 22:32:01 +0200 Subject: Minor change in concurrency model --- src/main/scala/Client/Client.scala | 9 ++------- 1 file changed, 2 insertions(+), 7 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 ef98ef3..2503cdf 100644 --- a/src/main/scala/Client/Client.scala +++ b/src/main/scala/Client/Client.scala @@ -147,24 +147,19 @@ class Client(socket: Socket): val directionDesc = "There are exits to " + this.possibleDirections.mkString(", ") (s"\n$actionDesc\n\n$areaDescription\n$directionDesc\n" + - s"\n$itemDesc\n$entityDesc") + s"\n$itemDesc\n$entityDesc\n") def startClient(): Unit = stdinReader.startReading() - // TODO: read data from server and store it in the turn description - // TODO: if turn isn't executed since lastturnstart, display the data - // and clean STDIN - // TODO: write data from stdin and send it to the server - // TODO: display timer to next turn end while true do sleep(POLL_INTERVAL) this.readAndParseDataFromServer() if this.lastExecutedTurn < this.lastTurnStart then - println(this.giveTurn()) + print(this.giveTurn()) stdinReader.newLine().foreach((s: String) => output.write(stringToByteArray(s+"\r\n")) -- cgit v1.2.3