aboutsummaryrefslogtreecommitdiff
path: root/src/scalevalapokalypsi/main.scala
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2024-11-17 14:19:58 +0200
committerJoel Kronqvist <joel.kronqvist@iki.fi>2024-11-17 14:20:27 +0200
commit5060c66738898913ca880d83b0fdcd5be2e0b59d (patch)
treebd4ecd70ebb8cc0342bd0a29c91c5b27fed38fb6 /src/scalevalapokalypsi/main.scala
parent4de67b497e0e229fe4a42f66f833640b6e50fd5a (diff)
downloadscalevalapokalypsi-5060c66738898913ca880d83b0fdcd5be2e0b59d.tar.gz
scalevalapokalypsi-5060c66738898913ca880d83b0fdcd5be2e0b59d.zip
Small style fixes (mostly shortening comment lines written by others...)
Diffstat (limited to 'src/scalevalapokalypsi/main.scala')
-rw-r--r--src/scalevalapokalypsi/main.scala8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/scalevalapokalypsi/main.scala b/src/scalevalapokalypsi/main.scala
index 9633f73..50e89e5 100644
--- a/src/scalevalapokalypsi/main.scala
+++ b/src/scalevalapokalypsi/main.scala
@@ -2,10 +2,8 @@ package scalevalapokalypsi
import scalevalapokalypsi.Client.newClient
import scalevalapokalypsi.Server.Server
-import java.lang.Thread
-import scala.concurrent.Future
-import scala.concurrent.ExecutionContext.Implicits.global
+import java.lang.Thread
import scala.io.StdIn.readLine
// TODO: add proper logic for starting the game
@@ -17,11 +15,11 @@ import scala.io.StdIn.readLine
println("Server started in background.")
print("Choose a name:\n> ")
val name = readLine()
- newClient(name, "127.0.0.1", 2267).map(_.startClient())
+ newClient(name, "127.0.0.1", 2267).foreach(_.startClient())
case Some(2) =>
print("Choose a name:\n> ")
val name = readLine()
- newClient(name, "127.0.0.1", 2267).map(_.startClient())
+ newClient(name, "127.0.0.1", 2267).foreach(_.startClient())
case _ => println("Invalid input")