summaryrefslogtreecommitdiff
path: root/sw-server
diff options
context:
space:
mode:
Diffstat (limited to 'sw-server')
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt4
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/lobby/Lobby.kt4
-rw-r--r--sw-server/src/test/kotlin/org/luxons/sevenwonders/server/test/TestUtils.kt10
3 files changed, 10 insertions, 8 deletions
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt
index 40a9407d..c15f7a68 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt
@@ -93,10 +93,10 @@ class GameController(
}
private fun sendPlayerReady(gameId: Long, player: Player) =
- template.convertAndSend("/topic/game/$gameId/playerReady", "\"${player.username}\"")
+ template.convertAndSend("/topic/game/$gameId/playerReady", "\"${player.username}\"")
private fun sendPreparedCard(gameId: Long, preparedCard: PreparedCard) =
- template.convertAndSend("/topic/game/$gameId/prepared", preparedCard)
+ template.convertAndSend("/topic/game/$gameId/prepared", preparedCard)
private fun sendTurnInfo(players: List<Player>, game: Game, hideHands: Boolean) {
val turns = game.getCurrentTurnInfo()
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/lobby/Lobby.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/lobby/Lobby.kt
index 2962e5df..ed8add56 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/lobby/Lobby.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/lobby/Lobby.kt
@@ -2,10 +2,10 @@ package org.luxons.sevenwonders.server.lobby
import org.luxons.sevenwonders.engine.Game
import org.luxons.sevenwonders.engine.data.GameDefinition
-import org.luxons.sevenwonders.model.wonders.AssignedWonder
-import org.luxons.sevenwonders.model.wonders.PreGameWonder
import org.luxons.sevenwonders.model.Settings
import org.luxons.sevenwonders.model.api.State
+import org.luxons.sevenwonders.model.wonders.AssignedWonder
+import org.luxons.sevenwonders.model.wonders.PreGameWonder
import org.luxons.sevenwonders.model.wonders.withRandomSide
class Lobby(
diff --git a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/test/TestUtils.kt b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/test/TestUtils.kt
index e4921ab4..194fb8f1 100644
--- a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/test/TestUtils.kt
+++ b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/test/TestUtils.kt
@@ -8,10 +8,12 @@ import org.springframework.messaging.MessageChannel
import org.springframework.messaging.simp.SimpMessagingTemplate
import kotlin.test.assertNotNull
-fun mockSimpMessagingTemplate(): SimpMessagingTemplate = SimpMessagingTemplate(object : MessageChannel {
- override fun send(message: Message<*>): Boolean = true
- override fun send(message: Message<*>, timeout: Long): Boolean = true
-})
+fun mockSimpMessagingTemplate(): SimpMessagingTemplate = SimpMessagingTemplate(
+ object : MessageChannel {
+ override fun send(message: Message<*>): Boolean = true
+ override fun send(message: Message<*>, timeout: Long): Boolean = true
+ }
+)
fun runAsyncTest(timeoutMillis: Long = 10000, block: suspend CoroutineScope.() -> Unit) = runBlocking {
val result = withTimeoutOrNull(timeoutMillis, block)
bgstack15