it.unibo.jakta.agents.bdi.dsl.environment.EnvironmentScope.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jakta-dsl Show documentation
Show all versions of jakta-dsl Show documentation
A Kotlin internal DSL for the definition of BDI agents
package it.unibo.jakta.agents.bdi.dsl.environment
import it.unibo.jakta.agents.bdi.dsl.Builder
import it.unibo.jakta.agents.bdi.dsl.actions.ExternalActionsScope
import it.unibo.jakta.agents.bdi.environment.Environment
class EnvironmentScope : Builder {
private val actionsScopes by lazy { ExternalActionsScope() }
private var environment = Environment.of()
infix fun actions(actions: ExternalActionsScope.() -> Unit) {
actionsScopes.also(actions)
}
fun from(environment: Environment) {
this.environment = environment
}
override fun build(): Environment = environment.copy(
externalActions = actionsScopes.build(),
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy