summaryrefslogtreecommitdiff
path: root/sw-client/src/commonMain/kotlin/org/luxons
diff options
context:
space:
mode:
Diffstat (limited to 'sw-client/src/commonMain/kotlin/org/luxons')
-rw-r--r--sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt8
1 files changed, 5 insertions, 3 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 480e9d67..e13ab505 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
@@ -18,6 +18,7 @@ import org.luxons.sevenwonders.model.PlayerTurnInfo
import org.luxons.sevenwonders.model.api.ConnectedPlayer
import org.luxons.sevenwonders.model.api.LobbyDTO
import org.luxons.sevenwonders.model.api.SEVEN_WONDERS_WS_ENDPOINT
+import org.luxons.sevenwonders.model.api.actions.AddBotAction
import org.luxons.sevenwonders.model.api.actions.ChooseNameAction
import org.luxons.sevenwonders.model.api.actions.CreateGameAction
import org.luxons.sevenwonders.model.api.actions.JoinGameAction
@@ -86,6 +87,10 @@ class SevenWondersSession(private val stompSession: StompSessionWithKxSerializat
stompSession.sendEmptyMsg("/app/lobby/leave")
}
+ suspend fun addBot(displayName: String) {
+ stompSession.convertAndSend("/app/lobby/addBot", AddBotAction(displayName), AddBotAction.serializer())
+ }
+
suspend fun reorderPlayers(players: List<String>) {
stompSession.convertAndSend("/app/lobby/reorderPlayers", ReorderPlayersAction(players), ReorderPlayersAction.serializer())
}
@@ -133,7 +138,4 @@ class SevenWondersSession(private val stompSession: StompSessionWithKxSerializat
suspend fun unprepareMove() {
stompSession.sendEmptyMsg("/app/game/unprepareMove")
}
-
-// suspend fun watchGameEnd() {
-// }
}
bgstack15