diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-27 00:05:26 +0100 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-27 10:59:39 +0100 |
commit | ffe55d869cb1ce5199e9fa729d8deed6a79ffcb6 (patch) | |
tree | f420ad24e0e8749be898cc6b64f8210a1fc598dc /sw-client/src/commonMain/kotlin | |
parent | Rename action classes for consistency (diff) | |
download | seven-wonders-ffe55d869cb1ce5199e9fa729d8deed6a79ffcb6.tar.gz seven-wonders-ffe55d869cb1ce5199e9fa729d8deed6a79ffcb6.tar.bz2 seven-wonders-ffe55d869cb1ce5199e9fa729d8deed6a79ffcb6.zip |
Add missing prepareMove method in SwClient
Diffstat (limited to 'sw-client/src/commonMain/kotlin')
-rw-r--r-- | sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt | 6 |
1 files changed, 6 insertions, 0 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 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()) + } } |