summaryrefslogtreecommitdiff
path: root/sw-client/src
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-04-01 23:16:45 +0200
committerJoffrey Bion <joffrey.bion@booking.com>2020-04-01 23:16:45 +0200
commit607466dd5e9940b4d73246c9bfcdeccec90d665c (patch)
treed4fa77275bfc97618eb19bc7733c24a6f5b263b4 /sw-client/src
parentRemove manual LinearDimension invocation (diff)
downloadseven-wonders-607466dd5e9940b4d73246c9bfcdeccec90d665c.tar.gz
seven-wonders-607466dd5e9940b4d73246c9bfcdeccec90d665c.tar.bz2
seven-wonders-607466dd5e9940b4d73246c9bfcdeccec90d665c.zip
Hide currently prepared card from hand
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