From 607466dd5e9940b4d73246c9bfcdeccec90d665c Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Wed, 1 Apr 2020 23:16:45 +0200 Subject: Hide currently prepared card from hand --- .../org/luxons/sevenwonders/client/SevenWondersClient.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sw-client/src') 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() + ) } -- cgit