diff options
author | joffrey-bion <joffrey.bion@gmail.com> | 2020-12-10 01:30:51 +0100 |
---|---|---|
committer | joffrey-bion <joffrey.bion@gmail.com> | 2020-12-10 01:31:46 +0100 |
commit | 747911a542b5971de182e4491393a8f53eb8e9a8 (patch) | |
tree | 25fd2b515e3289c6c3e15c66cc066421881b3f89 /sw-bot/src/main/kotlin/org | |
parent | Fix ready state for players (diff) | |
download | seven-wonders-747911a542b5971de182e4491393a8f53eb8e9a8.tar.gz seven-wonders-747911a542b5971de182e4491393a8f53eb8e9a8.tar.bz2 seven-wonders-747911a542b5971de182e4491393a8f53eb8e9a8.zip |
Decouple some sagas from routes
Resolves:
https://github.com/joffrey-bion/seven-wonders/issues/13
Diffstat (limited to 'sw-bot/src/main/kotlin/org')
-rw-r--r-- | sw-bot/src/main/kotlin/org/luxons/sevenwonders/bot/SevenWondersBot.kt | 3 |
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() |