summaryrefslogtreecommitdiff
path: root/sw-bot/src
diff options
context:
space:
mode:
authorjoffrey-bion <joffrey.bion@gmail.com>2021-02-10 02:02:46 +0100
committerjoffrey-bion <joffrey.bion@gmail.com>2021-02-10 02:31:38 +0100
commitdc62219e281641543cad6ece532f47c79fd19b3f (patch)
tree306d42d39d3aafe7643892bfab36f6072223db33 /sw-bot/src
parentImprove discord notifications (diff)
downloadseven-wonders-dc62219e281641543cad6ece532f47c79fd19b3f.tar.gz
seven-wonders-dc62219e281641543cad6ece532f47c79fd19b3f.tar.bz2
seven-wonders-dc62219e281641543cad6ece532f47c79fd19b3f.zip
Clean games when all humans have left
Resolves: https://github.com/joffrey-bion/seven-wonders/issues/113
Diffstat (limited to 'sw-bot/src')
-rw-r--r--sw-bot/src/main/kotlin/org/luxons/sevenwonders/bot/SevenWondersBot.kt4
1 files changed, 4 insertions, 0 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 aff31a3f..39759fd0 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
@@ -38,6 +38,10 @@ class SevenWondersBot(
private val config: BotConfig = BotConfig(),
private val session: SevenWondersSession,
) {
+ suspend fun disconnect() {
+ session.disconnect()
+ }
+
suspend fun createGameWithBotFriendsAndAutoPlay(
gameName: String,
otherBots: List<SevenWondersBot>,
bgstack15