aboutsummaryrefslogtreecommitdiff
path: root/src/scalevalapokalypsi/main.scala
diff options
context:
space:
mode:
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")