diff options
author | joffrey-bion <joffrey.bion@gmail.com> | 2021-02-10 02:02:46 +0100 |
---|---|---|
committer | joffrey-bion <joffrey.bion@gmail.com> | 2021-02-10 02:31:38 +0100 |
commit | dc62219e281641543cad6ece532f47c79fd19b3f (patch) | |
tree | 306d42d39d3aafe7643892bfab36f6072223db33 /sw-common-model/src | |
parent | Improve discord notifications (diff) | |
download | seven-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-common-model/src')
-rw-r--r-- | sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt index 8d352402..48b26aa4 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt @@ -4,6 +4,8 @@ import kotlinx.serialization.Serializable import org.luxons.sevenwonders.model.PlayerMove import org.luxons.sevenwonders.model.Settings import org.luxons.sevenwonders.model.wonders.AssignedWonder +import kotlin.time.ExperimentalTime +import kotlin.time.hours /** * The action to choose the player's name. This is the first action that should be called. @@ -101,12 +103,17 @@ class UpdateSettingsAction( * The action to add a bot to the game. Can only be called in the lobby by the owner of the game. */ @Serializable +@OptIn(ExperimentalTime::class) class AddBotAction( /** * The display name for the bot to add. */ val botDisplayName: String, /** + * The global timeout for the bot, after which it disconnects (whether the game is over or not). + */ + val globalBotTimeoutMillis: Long = 6.hours.toLongMilliseconds(), + /** * The configuration of the bot to add. */ val config: BotConfig = BotConfig(), |