Instance Method

add(_:)

Adds the specified rule to the system.

Declaration

func add(_ rule: GKRule)

Parameters

rule

A rule object.

Discussion

Adding rules to the system also adds them to the agenda list, in decreasing order of the rules’ salience values. Rules with the same salience are listed in the agenda in the order in which they were added to the system.

See Also

Managing a System’s List of Rules

var rules: [GKRule]

The list of rules to be executed when evaluating the system.

func add([GKRule])

Adds the specified list of rules to the system.

func removeAllRules()

Removes all rules from the system.