diff options
Diffstat (limited to 'sw-bot')
-rw-r--r-- | sw-bot/src/main/kotlin/org/luxons/sevenwonders/bot/SevenWondersBot.kt | 5 |
1 files changed, 4 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 01106d21..87ba7983 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 @@ -44,7 +44,10 @@ class SevenWondersBot( session.watchTurns() .onStart { emit(firstTurn) } .takeWhile { it.action != Action.WATCH_SCORE } - .onCompletion { session.disconnect() } + .onCompletion { + session.leaveGame() + session.disconnect() + } .collect { turn -> botDelay() session.playTurn(turn) |