---
title: "add(_:)"
framework: gameplaykit
role: symbol
role_heading: Instance Method
path: "gameplaykit/gkrulesystem/add(_:)-76jb5"
---

# add(_:)

Adds the specified rule to the system.

## Declaration

```swift
func add(_ rule: GKRule)
```

## Parameters

- `rule`: A rule object.

## Discussion

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

### Related Documentation

- [agenda](gameplaykit/gkrulesystem/agenda.md)

### Managing a System’s List of Rules

- [rules](gameplaykit/gkrulesystem/rules.md)
- [add(_:)](gameplaykit/gkrulesystem/add(_:)-7u5zw.md)
- [removeAllRules()](gameplaykit/gkrulesystem/removeallrules().md)
