summaryrefslogtreecommitdiff
path: root/sw-client
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-03-27 00:05:26 +0100
committerJoffrey Bion <joffrey.bion@booking.com>2020-03-27 10:59:39 +0100
commitffe55d869cb1ce5199e9fa729d8deed6a79ffcb6 (patch)
treef420ad24e0e8749be898cc6b64f8210a1fc598dc /sw-client
parentRename action classes for consistency (diff)
downloadseven-wonders-ffe55d869cb1ce5199e9fa729d8deed6a79ffcb6.tar.gz
seven-wonders-ffe55d869cb1ce5199e9fa729d8deed6a79ffcb6.tar.bz2
seven-wonders-ffe55d869cb1ce5199e9fa729d8deed6a79ffcb6.zip
Add missing prepareMove method in SwClient
Diffstat (limited to 'sw-client')
-rw-r--r--sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt6
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())
+ }
}
bgstack15