summaryrefslogtreecommitdiff
path: root/sw-bot
diff options
context:
space:
mode:
Diffstat (limited to 'sw-bot')
-rw-r--r--sw-bot/src/main/kotlin/org/luxons/sevenwonders/bot/SevenWondersBot.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw-bot/src/main/kotlin/org/luxons/sevenwonders/bot/SevenWondersBot.kt b/sw-bot/src/main/kotlin/org/luxons/sevenwonders/bot/SevenWondersBot.kt
index 48a96f08..01106d21 100644
--- a/sw-bot/src/main/kotlin/org/luxons/sevenwonders/bot/SevenWondersBot.kt
+++ b/sw-bot/src/main/kotlin/org/luxons/sevenwonders/bot/SevenWondersBot.kt
@@ -9,6 +9,7 @@ import kotlinx.coroutines.flow.takeWhile
import kotlinx.coroutines.withTimeout
import org.luxons.sevenwonders.client.SevenWondersClient
import org.luxons.sevenwonders.client.SevenWondersSession
+import org.luxons.sevenwonders.client.joinGameAndWaitLobby
import org.luxons.sevenwonders.model.Action
import org.luxons.sevenwonders.model.MoveType
import org.luxons.sevenwonders.model.PlayerMove
@@ -37,7 +38,7 @@ class SevenWondersBot(
suspend fun play(serverUrl: String, gameId: Long) = withTimeout(botConfig.globalTimeout) {
val session = client.connect(serverUrl)
session.chooseName(displayName, Icon("desktop"))
- session.joinGame(gameId)
+ session.joinGameAndWaitLobby(gameId)
val firstTurn = session.awaitGameStart(gameId)
session.watchTurns()
bgstack15