SimpleBranch

class SimpleBranch<S : TreeScript>(script: S, name: String, successComponent: TreeComponent<S>, failedComponent: TreeComponent<S>, validator: () -> Boolean) : Branch<S>

Functions

execute
Link copied to clipboard
open override fun execute()

Executes either successComponent or failedComponent depending on whether validate() return true or false

toString
Link copied to clipboard
open override fun toString(): String
validate
Link copied to clipboard
open override fun validate(): Boolean

Properties

failedComponent
Link copied to clipboard
open override val failedComponent: TreeComponent<S>
name
Link copied to clipboard
val name: String
script
Link copied to clipboard
val script: S
successComponent
Link copied to clipboard
open override val successComponent: TreeComponent<S>
validator
Link copied to clipboard
val validator: () -> Boolean