wizardsandwarriors

com.devbridie.wizardsandwarriors.dsl / RulesBuilder

RulesBuilder

class RulesBuilder<CP : CommandParameters, E : Effect>

Builds a list of Rules.

Supports adding rules and nesting rules using the + operator.

See Also

Rule

Constructors

Name Summary
<init> RulesBuilder()
Builds a list of Rules.

Functions

Name Summary
always fun always(): Any.() -> Boolean
build fun build(): List<Rule<CP, E>>
conditional fun conditional(condition: CP.() -> Boolean, f: RulesBuilder<CP, E>.() -> Unit): Unit
unaryPlus operator fun Rule<CP, E>.unaryPlus(): Unit
operator fun Collection<Rule<CP, E>>.unaryPlus(): Unit