aboutsummaryrefslogtreecommitdiff
path: root/src/scalevalapokalypsi/main.scala
diff options
context:
space:
mode:
authorAleksi Heikkila <aleksi.e.heikkila@aalto.fi>2024-11-23 22:33:53 +0200
committerAleksi Heikkila <aleksi.e.heikkila@aalto.fi>2024-11-23 22:33:53 +0200
commit27dd937617cce1e43df1c16e12050f6e88763d54 (patch)
tree8247736f7c4d5b1a0c1541c25f477e73e5783944 /src/scalevalapokalypsi/main.scala
parentb11c02e8f1f4dea09847da999c2acb2f96df8a58 (diff)
parent28b83db50f33cb704311ffe608dcd8c4412635cf (diff)
downloadscalevalapokalypsi-27dd937617cce1e43df1c16e12050f6e88763d54.tar.gz
scalevalapokalypsi-27dd937617cce1e43df1c16e12050f6e88763d54.zip
Merge branch 'master' of ssh://cron4.fi/~/O1-game
Diffstat (limited to 'src/scalevalapokalypsi/main.scala')
-rw-r--r--src/scalevalapokalypsi/main.scala25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/scalevalapokalypsi/main.scala b/src/scalevalapokalypsi/main.scala
deleted file mode 100644
index 50e89e5..0000000
--- a/src/scalevalapokalypsi/main.scala
+++ /dev/null
@@ -1,25 +0,0 @@
-package scalevalapokalypsi
-
-import scalevalapokalypsi.Client.newClient
-import scalevalapokalypsi.Server.Server
-
-import java.lang.Thread
-import scala.io.StdIn.readLine
-
-// TODO: add proper logic for starting the game
-@main def main(): Unit =
- print("How do you want to play?\n1) Host and join local game\n2) Join local game\n> ")
- readLine().toIntOption match
- case Some(1) =>
- Thread(() => new Server(2267, 5, 30, true).startServer()).start()
- println("Server started in background.")
- print("Choose a name:\n> ")
- val name = readLine()
- 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).foreach(_.startClient())
- case _ => println("Invalid input")
-
-