diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-30 11:30:32 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-30 11:35:10 +0200 |
commit | 0ca4028cdb58cc7649da04c0c2b16479ecd83d79 (patch) | |
tree | f027e587b2c4d8d30acdb4e6205d0319fe5df9b4 /sw-client | |
parent | Rename GameState -> TableState (diff) | |
download | seven-wonders-0ca4028cdb58cc7649da04c0c2b16479ecd83d79.tar.gz seven-wonders-0ca4028cdb58cc7649da04c0c2b16479ecd83d79.tar.bz2 seven-wonders-0ca4028cdb58cc7649da04c0c2b16479ecd83d79.zip |
Send turn info without hands when entering game
Diffstat (limited to 'sw-client')
-rw-r--r-- | sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt | 7 |
1 files changed, 4 insertions, 3 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 b97413c3..d72d353b 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 @@ -99,10 +99,11 @@ class SevenWondersSession(private val stompSession: StompSessionWithKxSerializat suspend fun watchLobbyUpdates(): StompSubscription<LobbyDTO> = stompSession.subscribe("/user/queue/lobby/updated", LobbyDTO.serializer()) - suspend fun awaitGameStart(gameId: Long) { - val gameStartSubscription = stompSession.subscribeEmptyMsg("/topic/lobby/$gameId/started") - gameStartSubscription.messages.receive() + suspend fun awaitGameStart(gameId: Long): PlayerTurnInfo { + val gameStartSubscription = stompSession.subscribe("/user/queue/lobby/$gameId/started", PlayerTurnInfo.serializer()) + val turnInfo = gameStartSubscription.messages.receive() gameStartSubscription.unsubscribe() + return turnInfo } suspend fun startGame() { |