From ffe55d869cb1ce5199e9fa729d8deed6a79ffcb6 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Fri, 27 Mar 2020 00:05:26 +0100 Subject: Add missing prepareMove method in SwClient --- .../kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sw-client/src/commonMain/kotlin/org') 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 c0d59ac0..d85538fd 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 @@ -13,6 +13,7 @@ import org.hildan.krossbow.stomp.sendEmptyMsg import org.hildan.krossbow.stomp.subscribeEmptyMsg import org.luxons.sevenwonders.model.CustomizableSettings import org.luxons.sevenwonders.model.GameState +import org.luxons.sevenwonders.model.PlayerMove import org.luxons.sevenwonders.model.PlayerTurnInfo import org.luxons.sevenwonders.model.api.LobbyDTO import org.luxons.sevenwonders.model.api.PlayerDTO @@ -20,6 +21,7 @@ import org.luxons.sevenwonders.model.api.SEVEN_WONDERS_WS_ENDPOINT import org.luxons.sevenwonders.model.api.actions.ChooseNameAction import org.luxons.sevenwonders.model.api.actions.CreateGameAction import org.luxons.sevenwonders.model.api.actions.JoinGameAction +import org.luxons.sevenwonders.model.api.actions.PrepareMoveAction import org.luxons.sevenwonders.model.api.actions.ReorderPlayersAction import org.luxons.sevenwonders.model.api.actions.UpdateSettingsAction import org.luxons.sevenwonders.model.api.errors.ErrorDTO @@ -113,4 +115,8 @@ class SevenWondersSession(private val stompSession: StompSessionWithKxSerializat suspend fun sayReady() { stompSession.sendEmptyMsg("/app/game/sayReady") } + + suspend fun prepareMove(move: PlayerMove) { + stompSession.convertAndSend("/app/game/prepareMove", PrepareMoveAction(move), PrepareMoveAction.serializer()) + } } -- cgit