summaryrefslogtreecommitdiff
path: root/sw-client/src/commonMain/kotlin/org/luxons
diff options
context:
space:
mode:
Diffstat (limited to 'sw-client/src/commonMain/kotlin/org/luxons')
-rw-r--r--sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt b/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt
index 6cc50f44..02f7f2da 100644
--- a/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt
+++ b/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt
@@ -122,10 +122,8 @@ class SevenWondersSession(private val stompSession: StompSessionWithKxSerializat
suspend fun watchLobbyUpdates(): Flow<LobbyDTO> =
stompSession.subscribe("/user/queue/lobby/updated", LobbyDTO.serializer())
- suspend fun awaitGameStart(gameId: Long): PlayerTurnInfo {
- val startEvents = stompSession.subscribe("/user/queue/lobby/$gameId/started", PlayerTurnInfo.serializer())
- return startEvents.first()
- }
+ suspend fun watchGameStarted(): Flow<PlayerTurnInfo> =
+ stompSession.subscribe("/user/queue/lobby/started", PlayerTurnInfo.serializer())
suspend fun startGame() {
stompSession.sendEmptyMsg("/app/lobby/startGame")
bgstack15