From 65f0cc0f6e8fe02d14b2467ed78f6ed944ace9cb Mon Sep 17 00:00:00 2001 From: Graham Date: Tue, 14 Jan 2020 23:07:40 +0000 Subject: [PATCH] Add GameServer skeleton --- game/src/main/java/dev/openrs2/game/GameModule.kt | 10 ++++++++++ game/src/main/java/dev/openrs2/game/GameServer.kt | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 game/src/main/java/dev/openrs2/game/GameModule.kt diff --git a/game/src/main/java/dev/openrs2/game/GameModule.kt b/game/src/main/java/dev/openrs2/game/GameModule.kt new file mode 100644 index 00000000..2df0a138 --- /dev/null +++ b/game/src/main/java/dev/openrs2/game/GameModule.kt @@ -0,0 +1,10 @@ +package dev.openrs2.game + +import com.google.inject.AbstractModule +import dev.openrs2.common.CommonModule + +class GameModule : AbstractModule() { + override fun configure() { + install(CommonModule()) + } +} diff --git a/game/src/main/java/dev/openrs2/game/GameServer.kt b/game/src/main/java/dev/openrs2/game/GameServer.kt index 25e406ca..c5371add 100644 --- a/game/src/main/java/dev/openrs2/game/GameServer.kt +++ b/game/src/main/java/dev/openrs2/game/GameServer.kt @@ -1,4 +1,17 @@ package dev.openrs2.game +import com.google.inject.Guice +import javax.inject.Singleton + fun main() { + val injector = Guice.createInjector(GameModule()) + val server = injector.getInstance(GameServer::class.java) + server.run() +} + +@Singleton +class GameServer { + fun run() { + TODO() + } }