summaryrefslogtreecommitdiff
path: root/sw-client/src
diff options
context:
space:
mode:
Diffstat (limited to 'sw-client/src')
-rw-r--r--sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt11
1 files changed, 7 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 d72d353b..ea449a85 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
@@ -10,7 +10,6 @@ import org.hildan.krossbow.stomp.conversions.kxserialization.StompSessionWithKxS
import org.hildan.krossbow.stomp.conversions.kxserialization.convertAndSend
import org.hildan.krossbow.stomp.conversions.kxserialization.withJsonConversions
import org.hildan.krossbow.stomp.sendEmptyMsg
-import org.hildan.krossbow.stomp.subscribeEmptyMsg
import org.luxons.sevenwonders.model.CustomizableSettings
import org.luxons.sevenwonders.model.PlayerMove
import org.luxons.sevenwonders.model.PlayerTurnInfo
@@ -123,7 +122,11 @@ class SevenWondersSession(private val stompSession: StompSessionWithKxSerializat
stompSession.sendEmptyMsg("/app/game/sayReady")
}
- suspend fun prepareMove(move: PlayerMove) {
- stompSession.convertAndSend("/app/game/prepareMove", PrepareMoveAction(move), PrepareMoveAction.serializer())
- }
+ suspend fun prepareMove(move: PlayerMove): PlayerMove = stompSession.request(
+ sendDestination = "/app/game/prepareMove",
+ receiveDestination = "/user/queue/game/preparedMove",
+ payload = PrepareMoveAction(move),
+ serializer = PrepareMoveAction.serializer(),
+ deserializer = PlayerMove.serializer()
+ )
}
bgstack15