diff options
Diffstat (limited to 'backend/src')
-rw-r--r-- | backend/src/main/kotlin/org/luxons/sevenwonders/repositories/LobbyRepository.kt | 4 | ||||
-rw-r--r-- | backend/src/test/kotlin/org/luxons/sevenwonders/lobby/LobbyTest.kt | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/backend/src/main/kotlin/org/luxons/sevenwonders/repositories/LobbyRepository.kt b/backend/src/main/kotlin/org/luxons/sevenwonders/repositories/LobbyRepository.kt index 261f723c..7ca78233 100644 --- a/backend/src/main/kotlin/org/luxons/sevenwonders/repositories/LobbyRepository.kt +++ b/backend/src/main/kotlin/org/luxons/sevenwonders/repositories/LobbyRepository.kt @@ -10,8 +10,6 @@ import java.util.HashMap @Repository class LobbyRepository @Autowired constructor() { - private val gameDefinitionLoader: GameDefinitionLoader = GameDefinitionLoader() - private val lobbies = HashMap<Long, Lobby>() private var lastGameId: Long = 0 @@ -20,7 +18,7 @@ class LobbyRepository @Autowired constructor() { fun create(gameName: String, owner: Player): Lobby { val id = lastGameId++ - val lobby = Lobby(id, gameName, owner, gameDefinitionLoader.gameDefinition) + val lobby = Lobby(id, gameName, owner, GameDefinitionLoader.gameDefinition) lobbies[id] = lobby return lobby } diff --git a/backend/src/test/kotlin/org/luxons/sevenwonders/lobby/LobbyTest.kt b/backend/src/test/kotlin/org/luxons/sevenwonders/lobby/LobbyTest.kt index 3abdde3b..84cef934 100644 --- a/backend/src/test/kotlin/org/luxons/sevenwonders/lobby/LobbyTest.kt +++ b/backend/src/test/kotlin/org/luxons/sevenwonders/lobby/LobbyTest.kt @@ -223,7 +223,7 @@ class LobbyTest { @JvmStatic @BeforeClass fun loadDefinition() { - gameDefinition = GameDefinitionLoader().gameDefinition + gameDefinition = GameDefinitionLoader.gameDefinition } } } |