All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.unibo.jakta.agents.bdi.dsl.environment.EnvironmentScope.kt Maven / Gradle / Ivy

There is a newer version: 0.11.122
Show newest version
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