summaryrefslogtreecommitdiff
path: root/sw-client/src/commonMain/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'sw-client/src/commonMain/kotlin')
-rw-r--r--sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt12
1 files changed, 3 insertions, 9 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 3dca33c1..ce0ef1fd 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
@@ -22,13 +22,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
-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.actions.*
import org.luxons.sevenwonders.model.api.errors.ErrorDTO
import org.luxons.sevenwonders.model.cards.PreparedCard
@@ -63,10 +57,10 @@ class SevenWondersSession(private val stompSession: StompSessionWithKxSerializat
fun watchErrors(): Flow<ErrorDTO> = stompSession.subscribe("/user/queue/errors", ErrorDTO.serializer())
- suspend fun chooseName(displayName: String): ConnectedPlayer = stompSession.request(
+ suspend fun chooseName(displayName: String, icon: Icon? = null): ConnectedPlayer = stompSession.request(
sendDestination = "/app/chooseName",
receiveDestination = "/user/queue/nameChoice",
- payload = ChooseNameAction(displayName),
+ payload = ChooseNameAction(displayName, icon),
serializer = ChooseNameAction.serializer(),
deserializer = ConnectedPlayer.serializer()
)
bgstack15